Closed (fixed)
Project:
Webform
Version:
7.x-3.9
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2011 at 04:46 UTC
Updated:
22 Aug 2011 at 03:51 UTC
I have created a contact us form using webform module, now i want o render this contact us form in a block , how to render it. I have used $form = drupal_get_form('webform_client_form_54') ; drupal_render($form) but it is not working.
Thanks.
Comments
Comment #1
eric_a commentedThere is very little point in trying to do this programmatically. See also #1140354: Webform - How to make a block.
Comment #2
quicksketchWebform can make any form into a block natively if you enable the "Expose as block" option under the Webform -> Settings tab on the Webform node.
Comment #3
mattmm commentedI just got this working and I'm wondering how you can pass the node URL into the webform results? the NID token just returns the original node that the web form was created as. However, this form resides on multiple pages and knowing which page the person contacted on is important.
Thoughts?
Comment #4
quicksketchYou can use %get['q'] as a token to record the internal Drupal path (which will contain the NID).