function lightbox2_form_alter in Lightbox2 5.2
Implementation of hook_form_alter().
Update the page action and input size.
Parameters
$form_id: We're only interested where the $form_id is "user_login". used.
&$form: General reference used in drupal, defining the structure & the fields of a form.
Return value
Return the structure of the form.
File
- ./
lightbox2.module, line 2387 - Enables the use of lightbox2 which places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths.
Code
function lightbox2_form_alter($form_id, &$form) {
if ($form_id == 'user_login_block' && arg(0) == 'user' && arg(1) == 'login' && arg(2) == 'lightbox2') {
$form['#action'] = url('user/login/lightbox2', 'destination=' . $_GET['destination']);
}
}