|> Home > Documentation > Latest documentation > Interchange tags > value|
Returns the the current value of the named form input field. Can also set a new value within the current page.
Tag expansion example
Assuming the value of the form variable "foo" is "bar":
or similarly with positional parameters:
Returns the the current value of the named form variable. This is similar to [cgi], except it displays saved form values, rather than any transitory CGI values that have been submitted with the current request.
When the value is returned, any Interchange tags and HTML present in the value will be escaped. This prevents users from entering Interchange tags in form fields, which could be a serious security risk. It also helps prevent HTML injection attacks.
This tag can also set a new value within the current page, using the set parameter, described below.
A value can be initialised to a default using the ValuesDefault local (catalog.cfg) configuration directive.
Also see the [value-extended] tag.
This is the name of the form variable whose value you want.
This sets a return value in case the named form variable is missing or otherwise false. The following will expand to "Using default":
Any "<" characters, found in the output value, will normally be converted into "<" for safety reasons. This conversion can be disabled by setting the "enable_html" parameter true.
Any "[" characters, found in the output value, will normally be converted into "[" for safety reasons. This conversion can be disabled by setting the "enable_itl" parameter true.
Setting filter="filter1 filter2" modifies the named form variable by running it through the specified filter(s).
See the filters category for a list of standard filters.
Set keep=1 if you want the tag to return a filtered result but do not want the filter to modify the CGI value itself in the $Values hashref.
Place a copy of the value in the scratchpad. For example:
You can change a value with set="new_value". The tag will return the new value you set unless you also pass the hide=1 parameter.
Setting hide=1 suppresses the tag's return value, which can be useful with the set attribute.