How to print the form created from webform.
It's something like a node form printed in the template( page.tpl.php or others) of drupal theme.

Link:
http://www.zyxware.com/articles/2941/solved-drupal-webform-drupal-get-fo...
https://www.drupal.org/node/233616

I tried these but it doesn't work.

Comments

aegirone created an issue. See original summary.

aegirone’s picture

Issue summary: View changes
kawal’s picture

You can do it using below code:

<?php

$nid = ''; //node id of the webform node
$node = node_load($nid);
$form = drupal_get_form('webform_client_form_' . $nid, $node);
print drupal_render($form);

?>
aegirone’s picture

#3 Thx. It works well.

aegirone’s picture

Status: Active » Fixed
spiralarts’s picture

Hi I'm new to Drupal. How and where do I apply this code? Can you please give me some directions, please?
Thanks in advance.

aegirone’s picture

#6
Templates in the theme of drupal 7.
If you need to output the form in some page , you should find the template( page.tpl.php or other files ended with .tpl.php ) and use these code.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.