How do I embed a node creation form inside a view I have a View with some fields and a couple of link items.

What I want to do is when I click on the link items, a node creation form associated with link should appear inside the view (the AJAX way).

The solution that I can think of is to embed the forms inside the view, but have no idea how to do that?

What is the best way to implement this?
Hope this will help you,

In Drupal 7 you can achieve by the following steps


You can embed a node creation form inside a VIEW


Either in VIEW Header or you can created a new VIEW and attach it to your VIEW

For this example I am embedding inside Views Header. Embedding inside Views Header will be the better options. Click to Add Views Header


Select Global: Text area


Add the PHP code and don't forget to change the Text Format to PHP


PHP code

&#60;?php 
    module_load_include('inc', 'node', 'node.pages');
    $node_form = node_add('node_type');
    print drupal_render($node_form);
?&#62;



Note : 


Don't forget to replace node_type in the PHP code.
Use hook_form_alter for node form redirection, as after the node creation the form will redirect to node detail page. If you want to redirect to your page then use $form_state['redirect'] = 'mycustompage'; reference
Enable PHP Filter module using admin/modules





Set the Permissions for this module by enabling "Administrator" for Execute PHP Code as follows:




If any one has better solution, please share it.