You are here

function lightbox2_form_contact_site_form_alter in Lightbox2 8

Same name and namespace in other branches
  1. 7.2 lightbox2.module \lightbox2_form_contact_site_form_alter()
  2. 7 lightbox2.module \lightbox2_form_contact_site_form_alter()

File

./lightbox2.module, line 1671
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_contact_site_form_alter(&$form, $form_state, $form_id = "contact_site_form") {
  if ($form_id == 'contact_site_form' && arg(0) == 'contact' && arg(1) == 'lightbox2') {
    $form['#action'] = \Drupal\Core\Url::fromRoute('contact.site_page');
  }
}