Вопрос

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

}
Это было полезно?

Решение

So close...

function testform_submit($form, &$form_state) {
  $form_state['redirect'] = 'https://www.google.de/';
}
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top