You are here

function field_placeholder_add_non_html5_support in Field placeholder 7.2

Adds Internet Explorer support through placeholder.js library.

http://jamesallardice.github.io/Placeholders.js/

1 call to field_placeholder_add_non_html5_support()
field_placeholder_field_widget_form_alter in ./field_placeholder.module
Implements hook_field_widget_form_alter().

File

./field_placeholder.module, line 108
Field placeholder module hooks and main functionality.

Code

function field_placeholder_add_non_html5_support() {
  $header_added =& drupal_static(__FUNCTION__);
  if (!$header_added) {
    if (libraries_get_path('placeholder')) {
      drupal_add_js(libraries_get_path('placeholder') . '/placeholders.jquery.min.js');
    }
    $header_added = TRUE;
  }
}