You are here

function rb_cck_action_email_userreference_form in Rules Bonus Pack 6

Configuration form for 'rb_cck_action_email_userreference'.

File

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

Code

function rb_cck_action_email_userreference_form($settings, &$form) {
  $userreference_fields = rb_cck_get_fields(array(
    'userreference',
  ));
  $form['settings']['field'] = array(
    '#type' => 'select',
    '#options' => $userreference_fields,
    '#title' => t('User reference field to use'),
    '#description' => t('All users listed in this field will receive the e-mail
      message.'),
    '#default_value' => $settings['field'],
  );
  $form['settings']['from'] = array(
    '#type' => 'textfield',
    '#title' => t('Sender'),
    '#default_value' => $settings['from'],
    '#description' => t('The from address of the e-mail. Leave it empty to use
      the site-wide configured address.'),
  );
  $form['settings']['subject'] = array(
    '#type' => 'textfield',
    '#title' => t('Subject'),
    '#default_value' => $settings['subject'],
    '#description' => t('The subject of the e-mail.'),
  );
  $form['settings']['message'] = array(
    '#type' => 'textarea',
    '#title' => t('Message'),
    '#default_value' => $settings['message'],
    '#description' => t('The e-mail message.'),
  );
}