Form callback; display the form for editing our module's content.
See also
contextual_links_example_object_edit_form_submit()
Related topics
1 string reference to 'contextual_links_example_object_edit_form'
- contextual_links_example_menu in contextual_links_example/
contextual_links_example.module - Implements hook_menu().
File
- contextual_links_example/
contextual_links_example.module, line 327 - Shows how to use Drupal's contextual links functionality.
Code
function contextual_links_example_object_edit_form($form, &$form_state, $object) {
$form['text'] = array(
'#markup' => t('This is the page that would allow you to edit object @id.', array(
'@id' => $object->id,
)),
'#prefix' => '<p>',
'#suffix' => '</p>',
);
$form['object_id'] = array(
'#type' => 'value',
'#value' => $object->id,
);
$form['actions'] = array(
'#type' => 'actions',
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Submit'),
);
return $form;
}