Does anybody know if there's a module that can support unique URLs for survey participants?

To clarify, what I mean is, I'd like to send out letters/ documentation to people in a particular geographic area. I'd like to encourage them to complete a survey, but for each recipient of the letter I'd like to assign a unique URL for their survey, which can then be used by me to marry them up to the data I already hold about them.

So, for example:

Person A receives a letter and is given a survey URL of www.mysite.com/ab123 Person B receives a letter and is given a survey URL of www.mysite.com/eg462 Person C receives a letter and is given a survey URL of www.mysite.com/qt368

and so on.

For a number of reasons, this method is better for my data collection purposes, rather than asking participants to include an assigned ID number or their own details.

  • What will you be using to create the survey? Webform? Node creation? A custom module? Something else? – marcvangend May 17 '11 at 21:20
  • Well, I'm open-minded at the moment. I have no set preference about how it's achieved. – James May 19 '11 at 14:22

You can use the webform API in a tiny module to access the form to add a hidden element to it. Then use the handy Drupal arg() function to determine the value of your unique URL argument. After, use the webform API function to change values before saving to the hidden field for administration usage later.

I can't guarantee this will work so hopefully some of the other Drupal Stack Exchange folks can verify this.

  • Thanks, Adam. Hopefully some others can shed some light on how they might do it? – James May 19 '11 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.