theme_form_required_marker

Versions
7
theme_form_required_marker($variables)

Theme the marker for required form elements.

Parameters

$variables An associative array containing:

  • element: An associative array containing the properties of the element.

Return value

A string representing the marker to identify required form elements.

Related topics

Code

includes/form.inc, line 2860

<?php
function theme_form_required_marker($variables) {
  // This is also used in the installer, pre-database setup.
  $t = get_t();
  $attributes = array(
    'class' => 'form-required',
    'title' => $t('This field is required.'),
  );
  return '<span' . drupal_attributes($attributes) . '>*</span>';
}
?>
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.