We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Suddenly all checkbox entries "invalid"

News and General

fensterbaby's avatar
fensterbaby
261 posts
6 years ago
fensterbaby's avatar fensterbaby

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.

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
6 years ago
Robin Sowell's avatar Robin Sowell

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.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.