RE: Passing in and capturing userid

"Muizelaar, T.J. \(CTW\)" <[email protected]> Wed, 21 Sep 2005 15:00:48 +0200
Newsgroups gmane.comp.apache.mod-survey.general
Message-ID <[email protected]>
Hi all,

The solution below works fine for capturing an userid. I've been trying
to use the same userid for a redirect after submitting the survey.

Basically, what I have is people entering the survey with an url of:
....?action=display&userid=xxxxxxx 

When they finish the survey, they have to be routed back to a personal
website, based on the same userid. This means that the CONTINUE
parameter should be something like: http://example.com/page_of_xxxxxxx 

I tried using {$userid$} but that did not work. Has someone an idea how
to provide a personal redirect?

Sincerely,


Thijs Muizelaar


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Joel
Palmius
Sent: vrijdag 12 augustus 2005 8:47
To: [email protected]
Subject: Re: survey-discussion-list: Passing in and capturing userid

Hello, sorry this answer took a while.

This scenario has usually been addressed through the use of perl
snippets. 
These have access to the argument line, ie the GET url.

<SURVEY TITLE="argument">

   <TEXT NAME="test" CAPTION="test" />

   <CUSTOM ESCAPED="no" VARIABLES="userid">
     <input type="hidden" name="userid" value="{\
       print $argument->ArgByName("userid") || "unknown";
     \}" />
   </CUSTOM>

</SURVEY>

You call this through, for example:

 
http//127.0.0.1/mod_survey/argument.survey?action=display&userid=joepal

The action=display is important since you'll get an argument error
otherwise.

   // Joel

On Wed, 10 Aug 2005, Paul Rosenberg wrote:

> Hi,
>
> When a survey is invoked via a link from an email message I want to be

> able to get hold of respondent-specific values such as "userid"  I 
> don't mind passing these in to the survey via the KEYWORDS parameter 
> or similar.  The idea is to pass such a value through to the 
> respondent's results via a hidden INPUT.  That latter stage is
documented of course.
>
> Any help appreciated.
>
> Best wishes,
> Paul Rosenberg
>
> Frontwire Ltd
> UK
>
> Tel: +44 (0)845 644 4365
>
> Skickat av Paul Rosenberg <[email protected]> till survey-discussion
>
Skickat av Joel Palmius <[email protected]> till survey-discussion

Skickat av "Muizelaar, T.J. \(CTW\)" <[email protected]>
till survey-discussion