I am using this tutorial (http://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/) to automatically generate a list of checkbox options based on a set of repeater values on the ‘Options’ page. Even though there are no options included in the ‘default’ value field for any of the checkboxes, the first option continues to get ‘checked.’ Even if you uncheck it, save the page, leave the page and come back, the first option for each section is checked again (unless you have others already checked). Any idea why this might be happening and how to stop it from happening?
Hi @apautler
Sounds like either your browser is caching the selected value (possible but unlikely. Try hard refresh) or more likely, the first choice has a blank value which is being matched to the DB value and is being selected.
Is it possible that the first choice has a value of “”?
Try also a new fresh post to avoid any old DB values.
Cheers
E
Thanks for the reply Elliot. I really appreciate it. I did a hard refresh and that didn’t seem to correct the issue. The initial ‘value’ for each option is 0 and increments from there (as shown here: http://cl.ly/image/262L1M3q0d0G), so I don’t think it is an issue that the value is empty.
When I create a new product, the first option is checked on all of them from the beginning.