To get rid of this ad please Sign up/Login.
Difference between revisions of "Template:EP Checkbox"
| Line 1: | Line 1: | ||
<html><span class="toggle"><input type='checkbox' </html> | <html><span class="toggle"><input type='checkbox' </html>{{#switch:{{{1}}}|1=checked|on=1||}}<html>></html>{{{2|}}}<html></input></span></html><noinclude> | ||
{{#switch:{{{1}}}|1=checked|on=1||}} | |||
<html>></html>{{{2|}}}<html></input></span></html> | Syntax: <nowiki>{{checkbox|STATE|TEXT}}</nowiki> | ||
< | |||
where both arguments are optional and: | |||
* STATE can be 0 (for unchecked) or 1 (for checked) | |||
* TEXT is text to follow the checkbox. | |||
Note: this template produces an active checkbox that currently does nothing except toggle between the initial state and its opposite. | |||
==Examples== | |||
{| | {| | ||
! This... !! produces this: | ! This... !! produces this: | ||
|- | |- | ||
| <nowiki>{{ | | <nowiki>{{checkbox}}</nowiki> || {{checkbox}} | ||
|- | |- | ||
| <nowiki>{{ | | <nowiki>{{checkbox|0|off}}</nowiki> || {{checkbox|0|off}} | ||
|- | |- | ||
| <nowiki>{{ | | <nowiki>{{checkbox|1}}</nowiki> || {{checkbox|1}} | ||
|- | |- | ||
| <nowiki>{{ | | <nowiki>{{checkbox|1|on}}</nowiki> || {{checkbox|1|on}} | ||
|} | |} | ||
Revision as of 03:09, 7 May 2013
<html><input type='checkbox' </html><html>></html><html></input></html>
Syntax: {{checkbox|STATE|TEXT}}
where both arguments are optional and:
- STATE can be 0 (for unchecked) or 1 (for checked)
- TEXT is text to follow the checkbox.
Note: this template produces an active checkbox that currently does nothing except toggle between the initial state and its opposite.
Examples
| This... | produces this: |
|---|---|
| {{checkbox}} | |
| {{checkbox|0|off}} | |
| {{checkbox|1}} | |
| {{checkbox|1|on}} |