Hi,
I'm developing custom module, which provides form with many selects/textfields. The form is changed based on a combobox selection. Some of the inputs are marked as required.
And now the problem. When user changes the combobox value, the form gets redrawn (which is fine). Then he fills all the other fields and submits the form. The _submit handler is processed correctly, but there are also messages displayed like "Field XX is required." - the form got validated on background during the ahah call.
The form was even trying to submit during the ahah call, which I was able to prevent by adding 'rebuild' => true to the ahah callback function.
But how to get rid of the form validation?
Thx for any suggestions.
--
Bydga
Comments
Firstly, have a look at what
Firstly, have a look at what the ahah_helper module does, there is plenty of code in there to handle most use cases of ahah.
Secondly, if it's your validation function you can inspect $form_state['values']['op'] before you run your validation.
Lee Rowlands
As I said, it's not problem
As I said, it's not problem in my own validation. I can handle that. The issue is with the "automatic" validation on required fields. I finally managed to handle everything by using:
But there must be nicer solution. And whatmore, the captcha isnt working at all.. Keeps saying something like "session attack detected" - which is really scary for normal users..