function node_registration_registrations_broadcast_form in Node registration 7
Return a form for sending a broadcast email to participants.
1 string reference to 'node_registration_registrations_broadcast_form'
- node_registration_menu in ./
node_registration.module - Implements hook_menu().
File
- includes/
node_registration.forms.inc, line 1238 - New registration forms. Public and admin.
Code
function node_registration_registrations_broadcast_form($form, &$form_state, $node) {
$form['#node'] = $node;
$registrations = node_registration_load_multiple(FALSE, array(
'nid' => $node->nid,
'cancelled' => 0,
));
$form['recipients'] = array(
'#type' => 'item',
'#title' => t('Recipients'),
'#markup' => count($registrations),
);
$form['bcc'] = array(
'#type' => 'textfield',
'#title' => t('Send BCC to'),
'#element_validate' => array(
'value_is_email',
),
'#max' => 20,
);
$form['subject'] = array(
'#type' => 'textfield',
'#title' => t('Subject'),
'#required' => TRUE,
'#maxlength' => 150,
);
$form['message'] = array(
'#type' => 'textarea',
'#title' => t('Message'),
'#required' => TRUE,
'#cols' => 60,
'#rows' => 6,
);
if ($node->registration->mail_system) {
$form['attachment'] = array(
'#type' => 'file',
'#title' => t('Attachment'),
'#required' => FALSE,
);
}
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['send'] = array(
'#type' => 'submit',
'#value' => t('Send'),
);
_node_registration_add_token_tree($form);
return $form;
}