function freelinking_form_alter in Freelinking 6
Same name and namespace in other branches
- 5 freelinking.module \freelinking_form_alter()
- 6.2 freelinking.module \freelinking_form_alter()
File
- ./
freelinking.module, line 350
Code
function freelinking_form_alter(&$form, $form_state, $form_id) {
if (isset($form['type'])) {
$type = $form['type']['#value'];
if (variable_get('freelinking_nodetype', 'story') == $type && isset($_GET['edit'])) {
// on the right node type, with GET data
$form['title']['#default_value'] = urldecode($_GET['edit']['title']);
// prepopulate the title field
}
// endif node type and data
}
// on a node creation form
}