Difference between revisions of "Template:EP Checkbox"

From EntropiaPlanets Wiki - Entropia Universe Guides Wiki Info
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>
<noinclude>
 
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>{{EP Checkbox}}</nowiki> || {{EP Checkbox}}
| <nowiki>{{checkbox}}</nowiki> || {{checkbox}}
|-
|-
| <nowiki>{{EP Checkbox|0|off}}</nowiki> || {{EP Checkbox|0|off}}
| <nowiki>{{checkbox|0|off}}</nowiki> || {{checkbox|0|off}}
|-  
|-  
| <nowiki>{{EP Checkbox|1}}</nowiki> ||  {{EP Checkbox|1}}
| <nowiki>{{checkbox|1}}</nowiki> ||  {{checkbox|1}}
|-
|-
| <nowiki>{{EP Checkbox|1|on}}</nowiki> || {{EP Checkbox|1|on}}
| <nowiki>{{checkbox|1|on}}</nowiki> || {{checkbox|1|on}}
|}
|}
</noinclude>

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}}