I looked for this and found nothing about how to add a node form in a ctools modal.

I tried this to do this myself using the code I've put on http://drupalbin.com/17065, but when I submit the form the node is not saved. I tried to add my own submission function to handle the node creation, but it seems like the submit is totally ignored.

Anyone can point me to a "how to" to achieve this or tell me what am I missing in my code to make it work?

Comments

drm’s picture

I am also trying to get a node form to work in a modal - not getting the submission. If there are any working examples, would be much appreciated.

tic2000’s picture

Unfortunately I didn't found a solution either.

drm’s picture

Since the form is displaying correctly with tic2000's code, but not submitting (no error, just no node created or log entries), I'm assuming that the way node submission finds its submission function (given different node type forms) is somehow the problem. I tried setting $form['#action'] but every variation caused an error. But the intricacies of form submission handler finding, particularly in this ajax environment, are beyond me.

nagiek’s picture

Hey I know it's been a while, but was a solution ever found for this? Any possibility of including a link?

Many thanks.

lcnphp’s picture

move module_load_include('inc', 'node', 'node.pages');

from somemodule_node_form

to somemodule_node_add_page

because during submitting, it need to load the node.pages.inc