[ic] CGI Values quesion

Jon Jensen jon at endpoint.com
Mon Apr 23 15:55:53 EDT 2007

On Mon, 23 Apr 2007, mail wrote:

> What is the scope of the "value" tag? Can I use it to set the values of 
> a bunch of cgi variables in forms across many pages?

Yes. It's just a sub-part of the session hash.

> Then I need to clear out form variables then load new values from saved
> data in a table.
> step one clear out the old values:
> [calc]
>         $Values = {};
>         return;
> [/calc]
> This clears out all the form values in the entire session right?

No, that replaces the $Values hashref with an empty one, but doesn't 
remove the values from the main session hashref. Instead, do:

%$Values = ();

That's an empty list, not an empty anonymous hash.

> step two load new values from table:
> Can I just loop through the table and set the with [value] tags? or is
> there a special way to set values in the session.
> After that, I have many form pages.  page one has one form and 5
> checkboxes, page two has another form and 5 different check boxes. I
> need to set the values of all 10 checkboxes in one shot from the table.

Normally people set values with [update values] after a form post; that 
copies CGI parameters into values space in the session so they're 
available on subsequent pages.


Jon Jensen
End Point Corporation

More information about the interchange-users mailing list