You are here

function rb_cck_action_merge_multiple_values_form in Rules Bonus Pack 6

Configuration form for 'rb_cck_action_merge_multiple_values'.

File

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

Code

function rb_cck_action_merge_multiple_values_form($settings, &$form) {
  $form['settings']['source_field'] = array(
    '#type' => 'select',
    '#title' => t('Field to copy from'),
    '#options' => rb_cck_get_fields(array(
      'multiple',
    )),
    '#default_value' => $settings['source_field'],
    '#description' => t('Note that only fields with single storage value (per
      entry) are selectable.'),
  );
  $form['settings']['target_field'] = array(
    '#type' => 'select',
    '#title' => t('Field to merge into'),
    '#options' => rb_cck_get_fields(array(
      'multiple',
    )),
    '#default_value' => $settings['target_field'],
    '#description' => t('Note that source and target field must be of the same
      type.'),
  );
}