I have a custom module, this module generate a table with some buttons. When a button is clicked I load with Ajax a form a display it in a div. The hook menu to call that function is for example /myapp/get_form.
The problem comes when I have to save some data of the new generated div. I created that div to save the data with ajax ( $form['submit'] = array('#ajax' => array(...))), but this new form does not save the data with ajax, this form post the data to /myapp/get_form, but that is not the behaviour I need.
So I have 2 questions.
- How do I post data generated with ajax in this new form?
- Would be ok to save the data (node) with JQuery disabling the submit and using Ajax+JSON?
Thanks!