Domanda

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/';

}
È stato utile?

Soluzione

So close...

function testform_submit($form, &$form_state) {
  $form_state['redirect'] = 'https://www.google.de/';
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top