rsvp_addedit_form($nid = NULL, $rid = NULL)
rsvp/rsvp.module, line 1033
$rid The id of the rsvp instance to edit.
<?php
function rsvp_addedit_form($nid = NULL, $rid = NULL) {
if (!is_null($rid)) {
$rsvp = rsvp_load($rid);
drupal_set_title($rsvp->name);
}
else {
$rsvp = new stdClass();
}
$form['name'] = array(
'#type' => 'textfield',
'#title' => t('RSVP Name'),
'#default_value' => $rsvp->name,
'#size' => 40,
'#maxlength' => 40,
'#description' => t('This is the name of your RSVP.')
);
$form['invite_text'] = array(
'#type' => 'textarea',
'#title' => t('RSVP Message'),
'#default_value' => $rsvp->invite_text,
'#cols' => 60,
'#rows' => 10,
'#description' => t('This text will be sent to the people you invite.')
);
$form['blind'] = array(
'#type' => 'checkbox',
'#title' => t('Hide attendees'),
'#return_value' => 1,
'#default_value' => $rsvp->blind,
'#description' => t('Prevent attendees from seeing who else is on the list.')
);
$form['list_email'] = array(
'#type' => 'checkbox',
'#title' => t('Allow list email'),
'#return_value' => 1,
'#default_value' => $rsvp->list_email,
'#description' => t('Allow attendees to send messages to the people invited to your RSVP.')
);
$form['allow_invite'] = array(
'#type' => 'checkbox',
'#title' => t('Allow attendee invites'),
'#return_value' => 1,
'#default_value' => $rsvp->allow_invite,
'#description' => t('Allow attendees to invite more people to the event')
);
$form['rid'] = array(
'#type' => 'hidden',
'#value' => $rsvp->rid
);
$form['nid'] = array(
'#type' => 'hidden',
'#value' => $nid
);
$form['update'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
'#name' => 'op'
);
if ($rid) {
$form['delete'] = array(
'#type' => 'submit',
'#value' => t('Delete'),
'#name' => 'op'
);
}
return $form;
}
?>