Reputation: 147
I am getting
"An illegal choice has been detected. Please contact the site administrator."
when I am trying to give term which doesn't exist in select box filter. I added validate true to the form_alter function for the particular its working and returning all data.How to add it dynamically without specifying the field name in the function.
$form['field_industry']['#validated'] = TRUE;
Else Is there any option to add form validate true in views
Thanks in advance
Upvotes: 0
Views: 116
Reputation: 147
I got this message when trying to select certain Industries in a list. Some Industries worked, some generated the "illegal choice" message. The problem turned out to be that some Industry names had ampersands in them and others didn't. When I changed the ampersands to "and" that fixed it.
Upvotes: 1