function userpoints_rules_amount_form in User Points 6
Rules Condition form configuration - set the amount to compare
2 calls to userpoints_rules_amount_form()
File
- ./
userpoints_rules.rules.inc, line 146 - Provide better integration into the rules module
Code
function userpoints_rules_amount_form($settings = array(), &$form, $use_category = TRUE) {
if ($use_category) {
$form['settings']['type'] = array(
'#type' => 'select',
'#title' => t('Userpoints category'),
'#options' => userpoints_get_categories(),
'#default_value' => isset($settings['type']) ? $settings['type'] : '',
'#required' => TRUE,
);
}
$form['settings']['amount'] = array(
'#type' => 'textfield',
'#title' => t('Amount to compare'),
'#default_value' => isset($settings['amount']) ? $settings['amount'] : '',
'#description' => t('The amount to compare if userpoints are >=. Example:30, will trigger the condition if the user userpoints are >= than 30 points.'),
);
}