You are here

function fape_field_edit_node_title_form in Field API Pane Editor (FAPE) 7

Subform to edit the entity 'title' field.

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

1 string reference to 'fape_field_edit_node_title_form'
fape_field_edit_page in ./fape.module
Page callback to edit an entity field.

File

./fape.module, line 308
Adds direct field editing via contextual links.

Code

function fape_field_edit_node_title_form(&$form, &$form_state) {
  $node = $form_state['entity'];
  $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'][] = 'fape_field_edit_node_title_form_submit';
}