function RulesDataUITextToken::inputForm

Implements RulesDataDirectInputFormInterface::inputForm().

Overrides RulesDataUIText::inputForm

File

ui/ui.data.inc, line 250

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