You are here

function _honeypot_form_add_css in Honeypot 6

Form pre_render callback to add CSS.

Using this callback rather than adding the CSS inline helps the added CSS apply even in case of a failed form validation.

1 string reference to '_honeypot_form_add_css'
honeypot_add_form_protection in ./honeypot.module
Form builder function to add different types of protection to forms.

File

./honeypot.module, line 188
Honeypot module, for deterring spam bots from completing Drupal forms.

Code

function _honeypot_form_add_css($form) {

  // Hide honeypot.
  drupal_add_css(drupal_get_path('module', 'honeypot') . '/css/honeypot.css', 'module');
  return $form;
}