You are here

function quickedit_field_node_title_edit_form in Quick Edit 7

Form constructor; in-place editing form for node's 'title' "extra field".

This isn't a true form. As such it modifies the $form by reference.

See also

quickedit_field_node_title_edit_form_submit()

1 string reference to 'quickedit_field_node_title_edit_form'
node_quickedit_extra_fields_info in includes/node.inc
Implements hook_quickedit_extra_fields_info().

File

includes/node.inc, line 187
Implements Quick Edit module hooks on behalf of node.module.

Code

function quickedit_field_node_title_edit_form(&$form, &$form_state, $node, $field_name) {
  _quickedit_node_object_prepare($node);
  $type = node_type_get_type($node);
  $form['title'] = array(
    '#type' => 'textfield',
    '#title' => check_plain($type->title_label),
    '#default_value' => !empty($node->title) ? $node->title : '',
    '#required' => TRUE,
    '#weight' => -5,
  );
  $form['#submit'][] = 'quickedit_field_node_title_edit_form_submit';
}