For more information... RTFM!
NAVIGATION
PAGES THAT LINK HERE
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

checked

This tag provides a "memory" for HTML radio buttons and checkboxes.

Summary

  • [checked name value]

Parameter Description Default
name The name of the CGI/value. None
value The value to test against. None
default Specify that this checkbox should be marked as "checked" if the named value is not set at all. None
delimiter Specify a delimiter for multiple (stacked) values \0
case Make the value check case sensitive. No
cgi Use the volatile $CGI space instead of the $Values space. No
multiple Check for multiple (stacked) values, separated by an ASCII NUL character. No

Example

Tag expansion example

[value name="example" set="foo"]

<input type="checkbox" name="foo" value=1 [checked name="foo" value=1]>
<input type="checkbox" name="bar" value=1 [checked name="bar" value=1]>
<input type="checkbox" name="foo" value=1 checked="checked">
<input type="checkbox" name="bar" value=1 >

Description

This tag provides a "memory" for HTML radio buttons and checkboxes.  The similar [selected] tag does the same, but for the HTML <select> tag.

<input type="radio" name="foo" value="on" [checked name="foo" value="on" default=1]>
<input type="radio" name="foo" value="off" [checked name="foo" value="off"]>

This will output "checked="checked"" if the "foo" value is equal to the specified value parameter.  The match will not be not case sensitive unless the optional case=1 parameter is used.

Note that checkbox items will never submit their value if not checked, so the box will not be reset To work around this behaviour, you must do something like this:

<input type="checkbox" name="foo" value=1 [checked name="foo" value=1 default=1]>
[value name=foo set=""]

Use the default parameter to specify that this checkbox should be marked "checked" if the named value variable is not set at all.

Parameters

name

The name of the CGI/value.

value

The value to test against.

default

Specify that this checkbox should be marked as "checked" if the named value is not set at all.

delimiter

Overrides the default ASCII NUL character, used to separate stacked values when operating in multiple mode.

case

Set to a true value to perform case-sensitive matches.

cgi

By default, the $Values space (i.e. [value foo]) is selected.  Use this parameter if you want to use the volatile $CGI space (i.e. [cgi foo]).

multiple

Check for multiple (stacked) values, separated by an ASCII NUL character ("\0" in Perl).  The default delimiter can be overridden using the delimiter parameter.

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Thursday 14 December 2006 at 6:40 PM (CST)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us