You are here

function userpoints_rules_category_form in User Points 6

Condition: check the transaction category configuration form

File

./userpoints_rules.rules.inc, line 206
Provide better integration into the rules module

Code

function userpoints_rules_category_form($settings = array(), &$form) {
  $form['settings']['category'] = array(
    '#type' => 'select',
    '#title' => t('Userpoints category'),
    '#options' => userpoints_get_categories(),
    '#default_value' => isset($settings['category']) ? $settings['category'] : '',
    '#required' => TRUE,
  );
}