I have a select list in a node edit form which is being converted to a Select2 dropdown by means of some extra javascript in order to pull remote data from a json file to populate the options.
This appears to work fine, but when I submit the node edit form I get the “An illegal choice has been detected” error and the form does not save the option.
I can see this is a question asked many times already but the answers so far do not help me, because they appear to suggest writing a custom module to alter the form, although this is not terribly clear.
I assume I cannot overcome this by adding some extra code to the javascript. And I do not know how to write a module for Drupal so I was wondering if someone could assume I’m an idiot and please give a much more detailed or simplified answer? Thanks!