EE 5.1.3
I have a checkbox text field that is populated by the contents of another text field.
Everything was working fine, but then I had to make some minor changes to values in the field that were being used to populate the checkboxes. Just changed case on some.
Now no matter what check boxes are selected, including none, I get an Invalid Selection error.
It sounds like the problem is the old value is saved in the entries (so ‘one’). It will not show anything as selected because ‘one’ doesn’t match ‘One’. But it’s in the database.
Flip your browser debug on and check the post- even if you select nothing, you’ll see it sending that old ‘one’ value.
And because validation compares what you sent in post (‘one’) to the current valid options (‘One’) and it’s not in there, you get the validation error.
The easy option is to undo the tweaks to the field options. Then things will validate- assuming no entries have the new options saved.
Or if you’re careful and back things up, you could update the database directly so the ‘ones’ in that field are changed to ‘Ones’. But you’d need to be very comfortable with mysql and back things up obsessively.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.