You are here

function rules_forms_action_set_title in Rules Forms Support 7

Action: Set the title of a form element.

Parameters

mixed $form: A reference to the form array of the form for which the event was triggered.

string $element: The element ID of the element being checked in the form of element_type:element_id.

string $title: The title to assign to the form element.

1 string reference to 'rules_forms_action_set_title'
rules_forms_rules_action_info in ./rules_forms.rules.inc
Implements hook_rules_action_info().

File

includes/rules_forms.eval.inc, line 263
Evaluation functions for Rules Forms module.

Code

function rules_forms_action_set_title($form, $element, $title) {
  $form_element =& _rules_forms_get_element($form, $element);
  if (isset($form_element) && (!isset($form_element['#access']) || $form_element['#access'] == TRUE)) {
    $form_element['#title'] = $title;
  }
}