Closed (fixed)
Project:
AHAH Forms Framework
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2007 at 14:13 UTC
Updated:
22 Oct 2008 at 13:39 UTC
When using the AHAH module in a form the normal Drupal validation does not work. If the line
$form['items'] += dynamic_subform_get_embedded('todos_node_form', 'todos_items_subform', $node);
is removed, then the validation works again.
The AHAH module also breakes the hook_validate() function and the 'validate' in hook_nodeapi.
The also exists in version 5.x-1.5-5, and also demostration site.
Some one has a solution?
Comments
Comment #1
nhck commentedI stumbled over this too - this is because drupal won't revalidade a form with a form-id already validated. However your whole form isn't really validated completely upon using ahah.
I changed my dynamic_subform.module:
this line:
drupal_validate_form($form_id, $old_subform); // run form_values through validation checkschange to this block:Comment #2
beltofteThanks for your Niels. It fixed the validation problem, but now i have a new problem.
When i submit the form, and validation sends me back to the form with some errors, then the AHAH part of the form does not work any more. If i press "Add New Item" in the todo list, then the form just hang and the ajax wheel does not show up. The only thing i can do is to reload the page.
Do you now what is happening, and how i fix the problem?
Comment #3
fall_0ut commentedhi
the problem of validate is resolved with this patch, but if add new item after validate the ahah block
test in Todo List
without patch
1 - create new node Todo List
2 - not insert data in field required (List Title: *)
3 - submit
4 - does not appear error of field required
** the validate not working
with patch
1 - create new node Todo List
2 - not insert data in field required (List Title: *)
3 - submit
4 - appear error of fieldset required (List Title: *)
5 - click for add the new item
6 - block
Comment #4
gorilla_ch commentedIs there any update for more viable solutions to enable the validation? AHAH is a decent module and will be great if the validation is functioning too.
Comment #5
okazakifudosan0@blog.drupal.ro commented応援しています、頑張って下さい。
岡崎市 不動産
[http://www.okazaki-fudousan.com/loan.html 岡崎市 不動産]
[url=http://www.okazaki-fudousan.com/loan.html]岡崎市 不動産[/url]
Comment #6
nhck commented