1 contextual_links_example.module contextual_links_example_node_action_form($form, &$form_state, $node)

Form callback; display the form for performing an example action on a node.

See also

contextual_links_example_node_action_form_submit()

Related topics

File

modules/examples/contextual_links_example/contextual_links_example.module, line 357
Hooks implementations for the Contextual Links Example module.

Code

function contextual_links_example_node_action_form($form, &$form_state, $node) {
  $form['text'] = array(
    '#markup' => t('This is the page that would allow you to perform an example action on node @nid.', array('@nid' => $node->nid)),
    '#prefix' => '<p>',
    '#suffix' => '</p>',
  );
  $form['nid'] = array(
    '#type' => 'value',
    '#value' => $node->nid,
  );

  $form['actions'] = array('#type' => 'actions');
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );

  return $form;
}