_form_get_class

Versions
4.6
_form_get_class($name, $required, $error)

▾ 6 functions call _form_get_class()

form_checkbox in includes/common.inc
Format a checkbox.
form_file in includes/common.inc
Format a file upload field.
form_password in includes/common.inc
Format a single-line text field that does not display its contents visibly.
form_radio in includes/common.inc
Format a radio button.
form_textarea in includes/common.inc
Format a multiple-line text field.
form_textfield in includes/common.inc
Format a single-line text field.

Code

includes/common.inc, line 1032

<?php
function _form_get_class($name, $required, $error) {
  return $name. ($required ? ' required' : '') . ($error ? ' error' : '');
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.