Helppppppppppppppppppp on form alter

fprotano@yahoo.com - March 24, 2009 - 17:33

Hi there, i have a great problem to solve. Now i explain it in a few words.

I am developping a module who implements a form alter on a specific content type. My goal is to add in the form 1 (the form of the specific content type) a link or a button which sends the user to a form 2 with all the values in a form 1 as a hidden inputs.

Sorry so much for my englis and to any help me to solve the problem.

Did you look at this:

MissyM - March 25, 2009 - 00:29

Did you look at this: http://drupal.org/project/multipage and similar projects?

multipage is impossible

fprotano@yahoo.com - March 25, 2009 - 09:52

Thanks for the reply but i dont want use multipage concepts because the source form that i want to alter must be submitted as the normal flow. I want only inject in the form another submit button that clicking it redirects the user to another form.
I hope that it's possible otherwise i must found anoter solution

thanks a lot

What about alter submit

Zyava - March 25, 2009 - 14:15

What about alter submit action of form 1? Something like

function yourmodule_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'form 1 id') {
       $form['#submit'] = array('your_form_1_submit_handler');
...
  }
}

 
 

Drupal is a registered trademark of Dries Buytaert.