function editablefields_inline_form in Editable Fields 6.3
Form API form function for field_edit_form. Returns a form api definition for editing fields.
1 string reference to 'editablefields_inline_form'
- editablefields_inline in plugins/
responders/ inline.inc - Menu callback.
File
- plugins/
responders/ inline.inc, line 103 - Editablefields CTools modal plugin.
Code
function editablefields_inline_form(&$form_state) {
$form = array();
$params = empty($form_state['_params']) ? array() : $form_state['_params'];
module_load_include('inc', 'content', 'includes/content.node_form');
$form['#node'] = $form_state['node'];
$node = $form_state['node'];
$nids = array(
$node->nid,
);
$field = content_fields($params['field_name'], $params['node_type']);
$form['#attributes'] = array(
'class' => $form_state['css_id'] . ' editablfields-inline',
);
$form['#field_info'][$params['field_name']] = $field;
$form += (array) content_field_form($form, $form_state, $field);
$form[$params['field_name']]['#weight'] = 0;
$form['nids'] = array(
'#type' => 'hidden',
'#default_value' => implode(',', $nids),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
'#weight' => 20,
);
$form['#submit'] = 'editablefields_inline_form_submit';
return $form;
}