You are here

public static function RulesFormsDataUI::defaultForm in Rules Forms Support 7

Provides the default form.

2 calls to RulesFormsDataUI::defaultForm()
RulesFormsDataElement::inputForm in includes/rules_forms.ui.inc
Returns a select list with options including only available elements.
RulesFormsDataValue::inputForm in includes/rules_forms.ui.inc
Sets the input type based on the selected form element type.

File

includes/rules_forms.ui.inc, line 23
Defines data type classes for forms and form elements.

Class

RulesFormsDataUI
Extends data to be used by Rules.

Code

public static function defaultForm($name, $info, $settings, $title, $type = 'select') {
  $form[$name] = array(
    '#type' => $type,
    '#title' => $title,
    '#default_value' => isset($settings[$name]) ? $settings[$name] : NULL,
    '#required' => empty($info['optional']),
  );
  return $form;
}