1 form_test.module form_test_two_instances()

Menu callback that returns two instances of the node form.

File

core/modules/simpletest/tests/form_test.module, line 2278
Helper module for the form API tests.

Code

function form_test_two_instances() {
  global $user;
  $node1 = entity_create('node', array(
    'uid' => $user->uid,
    'name' => (isset($user->name) ? $user->name : ''),
    'type' => 'page',
    'langcode' => LANGUAGE_NONE,
  ));
  $node2 = clone($node1);
  $return['node_form_1'] = backdrop_get_form('page_node_form', $node1);
  $return['node_form_2'] = backdrop_get_form('page_node_form', $node2);
  return $return;
}