advcheckbox not changing value when submitted

advcheckbox not changing value when submitted

by Jose Sanchez -
Number of replies: 1

Greetings,

I'm creating a simple form that has checkboxes but when I submit the form the values I get for the checkboxes do not change and always stay at the default value. However, I have a checkbox controller that DOES change of value from 0 to 1 and vice-versa when I submit the form but I want the individual checkboxes to be able to change too. 

Down below is an example of how I have the checkboxes declared.


Attachment module form checkboxes.JPG
Average of ratings: -
In reply to Jose Sanchez

Re: advcheckbox not changing value when submitted

by Naomi Quirke -
Have you checked that your $activities array only contains unique string elements?
You can confirm the problem is in the definition if you put above the loop: 
        $activities = ['a', 'b', 'c'];