SOLVED

Re: Multi-Select Checkbox ID

Go to solution
Sarah_Greig2
Level 3

Multi-Select Checkbox ID

Our developers are passing values to our multi-select checkboxes on a form. They are using the checkbox id. This is a number but for some reason the numers are changing. Are these ID numbers changing because the form has been saved. Does this mean that the ids change every time the form is saved?
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Multi-Select Checkbox ID

You mean the ID of the form elements, like mktoCheckbox_999_2?

As far as I know, those are not guaranteed to be static as you alter the form. That wouldn't be possible in any form builder, generally speaking. If you delete and re-add a checkbox element, for example, it would likely get a new back-end identifier.  Even if it looked the same on the front end, same label, etc. it's actually a new instance of the checkbox.

When you say your devs are "passing values" you mean they are checking some checkboxes programmatically? If so my advice would be for them to find the cbx using the checkbox's label, which you control as you build the form and therefore will not change unless you want it to.

View solution in original post

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Multi-Select Checkbox ID

You mean the ID of the form elements, like mktoCheckbox_999_2?

As far as I know, those are not guaranteed to be static as you alter the form. That wouldn't be possible in any form builder, generally speaking. If you delete and re-add a checkbox element, for example, it would likely get a new back-end identifier.  Even if it looked the same on the front end, same label, etc. it's actually a new instance of the checkbox.

When you say your devs are "passing values" you mean they are checking some checkboxes programmatically? If so my advice would be for them to find the cbx using the checkbox's label, which you control as you build the form and therefore will not change unless you want it to.