function quickedit_field_node_created_edit_form in Quick Edit 7
Form constructor; in-place editing form for node's 'created' "extra field".
This isn't a true form. As such it modifies the $form by reference.
See also
quickedit_field_node_created_edit_form_validate()
quickedit_field_node_created_edit_form_submit()
1 string reference to 'quickedit_field_node_created_edit_form'
- node_quickedit_extra_fields_info in includes/
node.inc - Implements hook_quickedit_extra_fields_info().
File
- includes/
node.inc, line 128 - Implements Quick Edit module hooks on behalf of node.module.
Code
function quickedit_field_node_created_edit_form(&$form, &$form_state, $node, $field_name) {
_quickedit_node_object_prepare($node);
$form['date'] = array(
'#type' => 'textfield',
'#title' => t('Authored on'),
'#maxlength' => 25,
'#description' => t('Format: %time. The date format is YYYY-MM-DD and %timezone is the time zone offset from UTC. Leave blank to use the time of form submission.', array(
'%time' => !empty($node->date) ? date_format(date_create($node->date), 'Y-m-d H:i:s O') : format_date($node->created, 'custom', 'Y-m-d H:i:s O'),
'%timezone' => !empty($node->date) ? date_format(date_create($node->date), 'O') : format_date($node->created, 'custom', 'O'),
)),
'#default_value' => !empty($node->date) ? $node->date : '',
);
$form['#validate'][] = 'quickedit_field_node_created_edit_form_validate';
$form['#submit'][] = 'quickedit_field_node_created_edit_form_submit';
}