You are here

public static function RulesDataUITextToken::inputForm in Rules 7.2

Implements RulesDataDirectInputFormInterface::inputForm().

Overrides RulesDataUIText::inputForm

File

ui/ui.data.inc, line 250
Contains data type related forms.

Class

RulesDataUITextToken
UI for text tokens.

Code

public static function inputForm($name, $info, $settings, RulesPlugin $element) {
  $form = parent::inputForm($name, $info, $settings, $element);
  if ($form[$name]['#type'] == 'textarea') {
    $form[$name]['#element_validate'][] = 'rules_ui_element_token_validate';
    $form[$name]['#description'] = t('May only contain lowercase letters, numbers, and underscores and has to start with a letter.');
    $form[$name]['#rows'] = 1;
  }
  return $form;
}