You are here

function webform_element_title_display in Webform 7.4

Same name and namespace in other branches
  1. 6.3 webform.module \webform_element_title_display()
  2. 7.3 webform.module \webform_element_title_display()

A Form API #pre_render function. Sets display based on #title_display.

This function is used regularly in D6 for all elements, but specifically for fieldsets in D7, which don't support #title_display natively.

1 string reference to 'webform_element_title_display'
_webform_render_fieldset in components/fieldset.inc
Implements _webform_render_component().

File

./webform.module, line 3655
This module provides a simple way to create forms and questionnaires.

Code

function webform_element_title_display($element) {
  if (isset($element['#title_display']) && strcmp($element['#title_display'], 'none') === 0) {
    $element['#title'] = NULL;
  }
  return $element;
}