Tags:
create new tag
view all tags

Question

How to include a field value (e.g from cnValue hereafter) in a SESSION_VARIABLE (e.g. sessionTest hereafter)?

My example:

<div class="twikiPageForm">
<form action="%SCRIPTURL%/view%SCRIPTSUFFIX%/%WEB%/TestPage2">
<table border="1">
<input type="text" name="cnValue" size="10" value="commonName=" />
%SESSION_VARIABLE{"sessionTest" set="%????%"}%
</table>
</form>

Environment

TWiki version: TWikiRelease04x00x05 build 11822
TWiki plugins:  
Server OS:  
Web server: httpd-2.2.2-1.2
Perl version: perl-5.8.8-5
Client OS:  
Web Browser:  
Categories: Forms

-- JoseREMY - 04 Oct 2007

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Use URLPARAM on the target page of form results like this:

%SESSION_VARIABLE{"sessionTest" set="%URLPARAM{"cnValue"}%"}%

You may also use an IF statement in the \"set\" value

-- JoseREMY - 29 Oct 2007

Change status to:
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2007-10-31 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.