You are here

function rb_cck_action_force_to_allowed_values_form in Rules Bonus Pack 6

Configuration form for 'rb_cck_action_force_to_allowed_values'.

File

./rb_cck.module, line 775
Functions for extending CCK field management with Rules.

Code

function rb_cck_action_force_to_allowed_values_form($settings, &$form) {
  $form['settings']['field'] = array(
    '#type' => 'select',
    '#title' => t('CCK text field list'),
    '#options' => rb_cck_get_fields(array(
      'single',
      'text',
    )),
    '#default_value' => $settings['field'],
    '#description' => t('Note that only fields with a single storage values are
      supported.'),
  );
  $form['settings']['smart_compare'] = array(
    '#type' => 'checkbox',
    '#title' => t('Do extended text comparison'),
    '#default_value' => $settings['smart_compare'],
    '#description' => t('If this option is checked, matching against allowed
      values is made case insensitive and, if necessary, by trimming white
      spaces. Results are always forced into values in the allowed values
      list.'),
  );
}