function form_test_two_instances

cis7 form_test.module form_test_two_instances()
cle7 form_test.module form_test_two_instances()
elmsmedia7 form_test.module form_test_two_instances()
icor7 form_test.module form_test_two_instances()
meedjum_blog7 form_test.module form_test_two_instances()
mooc7 form_test.module form_test_two_instances()

Menu callback that returns two instances of the node form.

1 string reference to 'form_test_two_instances'
form_test_menu in modules/simpletest/tests/form_test.module
Implements hook_menu().

File

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

Code

function form_test_two_instances() {
  global $user;
  $node1 = (object) array(
    'uid' => $user->uid,
    'name' => (isset($user->name) ? $user->name : ''),
    'type' => 'page',
    'language' => LANGUAGE_NONE,
  );
  $node2 = clone($node1);
  $return['node_form_1'] = drupal_get_form('page_node_form', $node1);
  $return['node_form_2'] = drupal_get_form('page_node_form', $node2);
  return $return;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.