Hey -
I’m having trouble getting validation disabled on a field. On load, the field (state) is a select box. However, on change of another element (country), the state field can be loaded with different values or be changed to a plain text input. However, I’m getting the validation error "State/Province: Incorrect value". No matter what I try, I can’t get that field’s validation disabled. Any thoughts? Thanks!
Isaac
eform checks to see if a select elements values have changed from the initialised values when it validates post data - this to protect against injection. The solution would be to start with a simple text input field, hide it with js and inject your select or other element dynamically into the dom. Then ensure the hidden field’s value is syncronised with the selected option value on change. On form submit remove the select field and eform will validate only the hidden field which will contain your selected value.
Ah -- I tried starting with a text field and then injecting the select, and got a MODx error. I never tried syncing the value and only passing the text field... Thanks for the tip!