function contribute_form_alter in Contribute 6
File
- ./
contribute.module, line 415 - Lets users contribute to projects
Code
function contribute_form_alter(&$form, $form_state, $form_id) {
$node = $form['#parameters'][2];
$budget = $node->contribute_budget;
$node_types = variable_get(contribute_node_types, array(
'page',
));
$add_form = in_array($form['type']['#value'], $node_types);
if ($form['#id'] == "node-form" && $add_form && !$form_state['submitted']) {
$form['contribute_node_form'] = array(
'#title' => t('Contribution Settings'),
'#type' => 'fieldset',
);
$form['contribute_node_form']['budget'] = array(
'#title' => "Budget",
'#type' => 'textfield',
'#default_value' => $budget,
);
}
}