The Drupal Webform module is both a popular and useful module for collecting information from web site visitors.
For the most part, you can install, activate and start to create your own webforms right away. The module is pretty easy to use, well crafted and created by one of my most favorite Drupal developers.
Using webform is great when collecting valuable information, but what happens when you need a bit more. Is it possible to know where a site visitor was when they clicked on a response form? Can you determine what browser they are using, and if they use Macintosh or Windows? You sure can, and it's VERY helpful! Take a few minutes to watch this video and start collecting even more useful information.
Modules referenced
UPDATE: 11/3/09 Unfortunately, the Webform module was updated, and some of the tips in this video no longer work as expected. Here is the reasoning and also some suggestions about how to regain some of the functionality within this Drupal support issue related to webform and SERVER variables.
UPDATE: 3/16/10 A great suggested workaround was posted as a comment on this article. I replied with information about how I am now capturing the path again. Thanks andyb for the contribution! http://gotdrupal.com/videos/drupal-webform-for-feedback#comment-786


Great video, Matt. Very helpful. Of course, I knew of the Webform module--now I know about it. Thanks!
Thank you very much for this nice video :)
Thank you very much!!
Very useful video! I'm going to try webform module right now!
Congrats , good article.
Great article..... very nice website easy to navigate and video player is awesome.
Matt,
Very cool on the green "Get Video" in the top right corner.
How about showng us how you did that.
I would like to to tie it into a "Send Feedback"
thanks
With a little elbow grease I managed to circumvent the problem after webform discontinued the referrer server variable.
The trick is to use a link for "Problem with this video..." with a twist: the url should look like this (an example):
<a href="/contact/referrer/drupal-multimedia-using-swf-tools">Problem with this video...</a>Note that this is equivalent to "/q?..." internally.
Lets grab the value of the GET request parameters with this hidden field:
%get[q]
The field will contain the parameters that we sent in the GET request.
Once we got that we can process it further in any way of our preference or just use as it is.
Very nice idea!
While most paths in a Drupal url should default to the lowest possible option (e.g. /contact/referrer/drupal-multimedia-using-swf-tools should default to /contact - when the path referrer/drupal-multimedia-using-swf-tools does not exist), it is remotely - and I mean remotely - possible that the path could exist.
I opted to simply append a query string to the url, creating a new GET variable. Here's what I put in my node.tpl.php
<a id="problem" href="/contact?path=<?php print drupal_get_path_alias($_GET['q']);?>">Problem with this video? Contact me</a>Then within the Form components of the Webform node I used the token value of
%get[path]Great work around!
This is exactly the kind of webform functionailty I've been trying to find for my wordpress site. I followed your tutorial on one of my drupal sites and together with the workaround it worked great. Guess that it might be a good idea to port my world cup site over to drupal afterall.
Hi there, thanks for this video, it explains things really well!
One thing though, when i test my form i get a blank page with an array displayed in my browser
something like...
Array
(
[0] => admin sent a message using the contact form at http://www.creativitea.co.uk/drupal_photos/contact.
[1] => test
[2] =>
Addtional information
)
I also get this if i try and use a contact form using the sitewide form?
Any ideas?
My log displays
Invalid argument supplied for foreach() in /home/creativitea.co.uk/www/drupal_photos/sites/all/modules/contact_field/contact_field.module on line 241.
When using the sitewide form.
Any help would be great!
Many thanks!
I have this issue as well except I don't get it on the site wide form. Did you figure it?
thanks!
I would like to ask help. I installed the webform modul, and I made a sing up form with several data. I would like to put a check-box in front of the submit button to exept the conditions, so the customers has to check it, otherwise they are not allowed to submit the form.
Please help me how can I do it in webform modul.
Thank you very much
Bonjour et merci pour les information bonne continuation
It's seems a god idea, until now I use an external script to fill the formularies, but now I will use the system you talk in your video.Thanks a lot!
Passing values in the URL in PHP is one of the easiest ways we can pass variables between web pages. The environment of the web is stateless, meaning that we cannot just pass variable values between web pages without adding some code to aid in the passing of values. Other more popular ways of preserving the state between web pages is by using sessions or cookies. But in this article, we're going to create a web form and see how we can pass values from that form to another page.
Step One
Create a new file and name it form.php. This will be the form that will collect data from our user. The important thing to note here is the value for the action which is processform.php (we'll create this later). After you submit the form, the values will be passed to processform.php.
Another thing to note is the value for the method which is GET. The GET method will show the values being passed in the URL. You should also take note of the names for the input boxes which is firstname and phonenumber.
Do you have a workaround for %server[HTTP_USER_AGENT]? It no longer works either because of a security hole.