function pay_node_form_alter in Pay 6
Same name and namespace in other branches
- 7 modules/pay_node/pay_node.module \pay_node_form_alter()
Implementation of hook_form_alter().
File
- modules/
pay_node/ pay_node.module, line 39
Code
function pay_node_form_alter(&$form, &$form_state, $form_id) {
// Include the payment settings form on an individual node.
if ($form['#id'] == 'node-form') {
require_once dirname(__FILE__) . '/includes/pay_node.admin.inc';
pay_node_admin_node_form_alter($form, $form_state);
}
// Provide general settings for any node type.
if ($form['#id'] == 'node-type-form') {
require_once dirname(__FILE__) . '/includes/pay_node.admin.inc';
pay_node_admin_node_type_form_alter($form, $form_state);
}
// Include a nid If we're on a menu callback for node or pay_node_pay_form.
if (isset($form_state['pay_node'])) {
$node = $form_state['pay_node'];
if (isset($form['#pay'])) {
$form['pay_node_nid'] = array(
'#type' => 'value',
'#value' => $node->nid,
);
return;
}
}
}