function lazy_pane_form_alter in Lazy Pane 7
Implements hook_form_alter().
Ensures all forms generated within a lazy pane request that have an empty #action parameter or one equal to the current request uri are overriden with an #action uri equal to that of the host page.
File
- ./
lazy_pane.module, line 43 - Main file for lazy_pane module.
Code
function lazy_pane_form_alter(&$form, $form_state, $form_id) {
if (!lazy_pane_is_lazy_request()) {
return;
}
if (empty($form['#action']) || $form['#action'] == request_uri()) {
$form['#action'] = url(lazy_pane_get_request_path());
}
}