function RulesLoopUI::form
Overrides RulesActionContainerUI::form
File
-
ui/
ui.plugins.inc, line 205
Class
- RulesLoopUI
- UI for Rules loops.
Code
public function form(&$form, &$form_state, $options = array(), $iterator = NULL) {
parent::form($form, $form_state, $options);
$settings = $this->element->settings;
$form['item'] = array(
'#type' => 'fieldset',
'#title' => t('Current list item'),
'#description' => t('The variable used for holding each list item in the loop. This variable will be available inside the loop only.'),
'#tree' => TRUE,
);
$form['item']['label'] = array(
'#type' => 'textfield',
'#title' => t('Variable label'),
'#default_value' => $settings['item:label'],
'#required' => TRUE,
);
$form['item']['var'] = array(
'#type' => 'textfield',
'#title' => t('Variable name'),
'#default_value' => $settings['item:var'],
'#description' => t('The variable name must contain only lowercase letters, numbers, and underscores and must be unique in the current scope.'),
'#element_validate' => array(
'rules_ui_element_machine_name_validate',
),
'#required' => TRUE,
);
}