You are here

function _ad_actions_email_form in Advertisement 7

Same name and namespace in other branches
  1. 6.3 actions/ad_actions.module \_ad_actions_email_form()
  2. 6.2 actions/ad_actions.module \_ad_actions_email_form()

A helper function for building ad action forms.

2 calls to _ad_actions_email_form()
ad_actions_send_email_action_after_form in actions/ad_actions.module
Return a form definition so the advanced email action can be configured.
ad_actions_send_email_action_before_form in actions/ad_actions.module
Return a form definition so the advanced email action can be configured.

File

actions/ad_actions.module, line 338
Enable ad triggers and actions.

Code

function _ad_actions_email_form($context) {
  $form = array();
  $form['recipient'] = array(
    '#type' => 'textfield',
    '#title' => t('Recipient'),
    '#default_value' => isset($context['recipient']) ? $context['recipient'] : '',
    '#size' => '20',
    '#maxlength' => '254',
    '#description' => t('The email address to which the message should be sent. Tokens are allowed. Separate multiple email addresses with commas.'),
  );
  $form['subject'] = array(
    '#type' => 'textfield',
    '#title' => t('Subject'),
    '#default_value' => isset($context['subject']) ? $context['subject'] : '',
    '#size' => '20',
    '#maxlength' => '254',
    '#description' => t('The subject of the message. Tokens are allowed.'),
  );
  $form['message'] = array(
    '#type' => 'textarea',
    '#title' => t('Message'),
    '#default_value' => isset($context['message']) ? $context['message'] : '',
    '#cols' => '80',
    '#rows' => '20',
    '#description' => t('The message that should be sent. Tokens are allowed.'),
  );
  return $form;
}