I am using drupal 7, i am embedding a node add form using the solution provided here: Drupal 7 - How to display node/add/sometype form on another page? (using node_add('content_type') )

The form displays fine, but there is one problem, the "add another item" button does not work fine, i can see the ajax request being sent but it wont return anything and there is no error, i am banging me head over this for past 2 hours now, but cant find a solution about it.

Any help would be appriciated.

drupal-7

Comments

nsuit’s picture

Add this to your module:

function YOURMODULE_menu_alter(&$items) {
  $items['file/ajax']['file path'] = drupal_get_path('module', 'node');
  $items['file/ajax']['file'] = 'node.pages.inc';
  $items['system/ajax']['file path'] = drupal_get_path('module', 'node');
  $items['system/ajax']['file'] = 'node.pages.inc';
}

Found the solution here:
http://drupal.stackexchange.com/questions/3364/embed-a-node-add-form-in-...