function paypal_donate_form in Paypal Donation 6
Same name and namespace in other branches
- 7 paypal_donate.module \paypal_donate_form()
This function returns the form that will displayed on the content creation page.
@since 1.0
Parameters
$node object to pass the values to the form.:
Return value
array form with node settings.
File
- ./
paypal_donate.module, line 94
Code
function paypal_donate_form(&$node) {
$type = node_get_types('type', $node);
$form['title'] = array(
'#type' => 'textfield',
'#title' => t('Donation title'),
'#required' => TRUE,
'#default_value' => $node->title,
'#weight' => -5,
);
$form['body_filter']['body'] = array(
'#type' => 'textarea',
'#title' => t('Donation body'),
'#default_value' => $node->body,
'#required' => FALSE,
'#weight' => 1,
);
$form['body_filter']['filter'] = filter_form($node->format);
$form['account'] = array(
'#type' => 'textfield',
'#title' => t('Paypal account email'),
'#required' => FALSE,
'#default_value' => $node->paypal_account,
'#weight' => 2,
);
return $form;
}