You are here

function print_mail_action_submit_form in Printer, email and PDF versions 6

File

print_mail/print_mail.module, line 585
Displays Printer-friendly versions of Drupal pages.

Code

function print_mail_action_submit_form($settings, &$form) {
  $settings += array(
    'from' => '',
    'from_name' => '',
    'to' => '',
    'subject' => '',
    'message' => '',
  );
  $form['settings']['from'] = array(
    '#type' => 'textfield',
    '#title' => t('From email adress'),
    '#default_value' => $settings['from'],
    '#size' => 60,
    '#maxlength' => 128,
    '#required' => TRUE,
  );
  $form['settings']['from_name'] = array(
    '#type' => 'textfield',
    '#title' => t('From name'),
    '#default_value' => $settings['from_name'],
    '#size' => 60,
    '#maxlength' => 128,
    '#required' => TRUE,
  );
  $form['settings']['to'] = array(
    '#type' => 'textfield',
    '#title' => t('Send email to'),
    '#default_value' => $settings['to'],
    '#size' => 60,
    '#maxlength' => 128,
    '#required' => TRUE,
  );
  $form['settings']['subject'] = array(
    '#type' => 'textfield',
    '#title' => t('Subject'),
    '#default_value' => $settings['subject'],
    '#size' => 60,
    '#maxlength' => 128,
    '#required' => TRUE,
  );
  $form['settings']['message'] = array(
    '#type' => 'textarea',
    '#title' => t('Message'),
    '#default_value' => $settings['message'],
    '#description' => t('The message that should be displayed (optional).'),
  );
}