function example_form_submit
7.x example.profile | example_form_submit($form, &$form_state) |
6.x example.profile | example_form_submit($form, &$form_state) |
Form API submit for the example form.
File
- documentation-7.x/
developer/ example.profile, line 305
Code
function example_form_submit($form, &$form_state) {
// This code is executed, while the form is submitted. There's
// a wide range of possible operations to execute here, such as
// process and store settings, enable extra modules, or save
// contents to the new site (unless the operations are too
// expensive: the Batch API is a good choice for such operations,
// but it needs to be coded inside hook_profile_tasks(), not
// here).
// In this example profile, we just store the submitted text to
// a temporary variable, to be used in further tasks.
variable_set('example_submitted_text', $form_state['values']['example_text']);
}