You are here

function freelinking_form_alter in Freelinking 6.2

Same name and namespace in other branches
  1. 5 freelinking.module \freelinking_form_alter()
  2. 6 freelinking.module \freelinking_form_alter()

File

./freelinking.module, line 348

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 && $_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
}