You are here

function lightbox2_iframe_settings_form_validate in Lightbox2 5.2

Same name and namespace in other branches
  1. 8 lightbox2.admin.inc \lightbox2_iframe_settings_form_validate()
  2. 6 lightbox2.admin.inc \lightbox2_iframe_settings_form_validate()
  3. 7.2 lightbox2.admin.inc \lightbox2_iframe_settings_form_validate()
  4. 7 lightbox2.admin.inc \lightbox2_iframe_settings_form_validate()

Validation function for the iframe configuration form.

Ensure that the iframe width and height submitted are numeric.

File

./lightbox2.module, line 1006
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_iframe_settings_form_validate($form_id, $form_values) {
  if (!is_numeric($form_values['lightbox2_default_frame_width'])) {
    form_set_error('lightbox2_slideshow_interval', t('The "default width" value must be numeric.'));
  }
  if (!is_numeric($form_values['lightbox2_default_frame_height'])) {
    form_set_error('lightbox2_slideshow_interval', t('The "default height" value must be numeric.'));
  }
}