function theme_form_required_marker

theme_form_required_marker($variables)

Returns HTML for a marker for required form elements.

Parameters

$variables: An associative array containing:

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

Related topics

File

includes/form.inc, line 4277
Functions for form and batch generation and processing.

Code

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>';
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!form.inc/function/theme_form_required_marker/7.x