function form_test_redirect
Form builder to detect form redirect.
1 string reference to 'form_test_redirect'
- form_test_menu in modules/
simpletest/ tests/ form_test.module - Implements hook_menu().
File
-
modules/
simpletest/ tests/ form_test.module, line 1860
Code
function form_test_redirect($form, &$form_state) {
$form['redirection'] = array(
'#type' => 'checkbox',
'#title' => t('Use redirection'),
);
$form['destination'] = array(
'#type' => 'textfield',
'#title' => t('Redirect destination'),
'#states' => array(
'visible' => array(
':input[name="redirection"]' => array(
'checked' => TRUE,
),
),
),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.