You are here

function quickedit_field_node_author_edit_form in Quick Edit 7

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

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

See also

quickedit_field_node_author_edit_form_validate()

quickedit_field_node_author_edit_form_submit()

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

File

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

Code

function quickedit_field_node_author_edit_form(&$form, &$form_state, $node, $field_name) {
  _quickedit_node_object_prepare($node);
  $form['name'] = array(
    '#type' => 'textfield',
    '#title' => t('Authored by'),
    '#maxlength' => 60,
    '#autocomplete_path' => 'user/autocomplete',
    '#default_value' => !empty($node->name) ? $node->name : '',
    '#weight' => -1,
    '#description' => t('Leave blank for %anonymous.', array(
      '%anonymous' => variable_get('anonymous', t('Anonymous')),
    )),
  );
  $form['#validate'][] = 'quickedit_field_node_author_edit_form_validate';
  $form['#submit'][] = 'quickedit_field_node_author_edit_form_submit';
}