hello
im using a ahah form element using hook_form_alter in a custom made node module.
this custom module has some mandatory fields.

here is my problem :

1/ im creating a new node
2/ im using ahah to change a value
3/ i submit the form without filling mandatory fields
4/ so i have a new page telling me "missing fields..." and now with the new node form, the main form "action" is set to the ahah submit url

do you know where should i watch ?

Comments

ssm2017 Binder’s picture

i have 2 modules :
1/ to just only generate the ahah form element
2/ the custom node main form

if im not touching the ahah field, all is fine

ssm2017 Binder’s picture

i have found a workaround that is not legal but working

i had to force the value with

function mycustomnode_form(&$node, $form_state) {
  $type = node_get_types('type', $node);

  $action = '/node/add/'. $type->type;

  if ($node->nid) {
    $action = '/node/'. $node->nid. '/edit';
  }
  $form['#action'] = $action;
.......
danylevskyi’s picture

I have the same problem.
I think this is a bug...

gianluca.b’s picture

Any solutions?

primerg’s picture

How do I use this with a cck content type?

--
Rachel J.