Question

I have a submitt drupal form in a my module:

$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
 );

And this is my submitt function , what command have to add to direct the user to a specific page with a specific path? I tried this but it didnt work

function testform_submit($form, &$form_state) {
 $form_state['submit'] = 'https://www.google.de/';

}
Was it helpful?

Solution

So close...

function testform_submit($form, &$form_state) {
  $form_state['redirect'] = 'https://www.google.de/';
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top