Form icon indicating copy to clipboard operation
Form copied to clipboard

How do I choose id for each element?

Open hiren43 opened this issue 8 years ago • 1 comments

I just encountered a problem for elements having same id won't work. So far I was using id name same as title which user decides. But giving same title in both elements, former element interaction is not possible in this library. This information will not be entered by users. We developers have to choose unique id for all elements. So can I use numbers starts from 1 as id for all elements like 1 for first element and 2 for second element and so on. Please advise me on this as soon as possible. Thank you

hiren43 avatar Aug 17 '17 06:08 hiren43

Hi @hiren43,

The recommended id for elements is composed of the section and the title of the field. For example, you could have several sections with the field name.

  • ID personal-details.first_name (Your first name)
  • ID partnership-details.first_name(your wife or husbands first name)

I hope that's clear enough :) Let me know if I can help with anything else.

3lvis avatar Aug 17 '17 10:08 3lvis