Re: Passing in and capturing userid
Joel Palmius <[email protected]> Fri, 12 Aug 2005 08:47:11 +0200 (CEST)
| Newsgroups | gmane.comp.apache.mod-survey.general |
|---|---|
| Message-ID | <[email protected]> |
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