function feeds_tamper_math_form in Feeds Tamper 6
Same name and namespace in other branches
- 7 plugins/math.inc \feeds_tamper_math_form()
File
- plugins/
math.inc, line 17
Code
function feeds_tamper_math_form($importer, $element_key, $settings) {
$form = array();
$form['operation'] = array(
'#type' => 'select',
'#title' => t('Operation'),
'#description' => t('The operation to apply to the imported value.'),
'#required' => TRUE,
'#options' => array(
'addition' => '+',
'subtraction' => '-',
'multiplication' => '*',
'division' => '/',
),
'#default_value' => isset($settings['operation']) ? $settings['operation'] : '',
);
$form['value'] = array(
'#type' => 'textfield',
'#title' => t('Value'),
'#required' => TRUE,
'#description' => t('A numerical value.'),
'#default_value' => isset($settings['value']) ? $settings['value'] : '',
);
return $form;
}