Webforms to email different hidden values?

Events happening in the community are now at Drupal community events on www.drupal.org.
jessSchn's picture

I have a couple Drupal 6 websites that use webforms to collect leads and within these web forms is a hidden value that is set to see where our leads are coming from (this value gets emailed to us). For example Field Name: Source, Field Value: Apr_Newsletter_banner_2012.

When we send out the "same" form to different locations, we end up cloning the webform and changing the hidden value so we can see who came from which source. This makes for many webforms that are the same except for the hidden value.

Is there a better way to do this? It just seems like a difficult process to just change one value.

On small php sites that are used, I have attached a query to the url that will include the query value in an email so we can see where leads came from when a form is submitted BUT we don't have to duplicate the site when we direct users to the site from different locations (from a newsletter vs. a banner ad). Example: http://yourwebsite.com/index.php?source=Apr_Newsletter_banner_2012.

Is it possible to use the url query with Drupal 6 webforms?

Comments

Passing variables to Webform

wylbur's picture

I checked to see if you could use the prepopulate module, but that does not have support for webforms.

While looking for that answer, I came across this post about passing variables from the URL. This should be just what you are looking for.
http://drupal.org/node/587306

I could hug you!

jessSchn's picture

Oh my gosh! That was exactly what I was looking for.

I just changed the hidden field value to %get[key] and then when I access the form I append ?key=xxxxx to the url. I tested this process and it worked great.

Thank you so much! This will save us so much time.

Twin Cities

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: