How to display a popup box containing webform using simple dialog module of Drupal 7

This article will guide you to create a simple dialog / popup box which will have a webform in it. To use this you need two modules one is Webform and other is Simple Dialog. Download and install these modules before deploying this article.
 
To display a webform first you need to create a webform, 
We will create a simple webform to demontrate this example,
 
Go to "Add Content" and create a webform containing a name field and an email field.
 
After doing this create a simple block and add following code to it,
 
<a href="/my-webform" class="simple-dialog" name="webform-client-form-562" title="My Webform Title" rel="width:900;position:[center,60];">Link TItle</a>
 
Where href will contain url of your webform, name will have form id(To get form Id, ispect form element and you will see form id in <form> element
and <hidden> element) and title will be the text which appear on the poped up form.
 
Hope you have successfully implemented this on your drupal 7 project, if you are facing any problems feel free to comment.
Thanks..
 
Author: 
Source: 
http://drupal.org/project/webform
http://drupal.org/project/simple_dialog
http://drupal.org/node/1222698

Add new comment