SOLVED

Multi-Select Checkbox ID

Go to solution
Highlighted
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
Highlighted
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
Highlighted
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