function theme_form_required_marker

7.x form.inc 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

2 theme calls to theme_form_required_marker()
theme_field_multiple_value_form in drupal/modules/field/field.form.inc
Returns HTML for an individual form element.
theme_form_element_label in drupal/includes/form.inc
Returns HTML for a form element label and required marker.
3 string references to the theme hook from theme_form_required_marker()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

drupal_common_theme in drupal/includes/common.inc
Provides theme registration for themes across .inc files.
theme_field_multiple_value_form in drupal/modules/field/field.form.inc
Returns HTML for an individual form element.
theme_form_element_label in drupal/includes/form.inc
Returns HTML for a form element label and required marker.

File

drupal/includes/form.inc, line 4157
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>';
}