# maxbuttons/7.13.2/blocks/tpl/switch.tpl

MaxButtons – Create buttons, version 7.13.2. 20 lines.

- Page: https://pluginprobe.com/plugins/maxbuttons/7.13.2/code/blocks/tpl/switch.tpl
- Raw: https://pluginprobe.com/plugins/maxbuttons/7.13.2/raw/blocks/tpl/switch.tpl
- Modified: 2018-11-15T10:55:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/maxbuttons/7.13.2/code/blocks/tpl/switch.tpl#L10-L20`.

```
	  {if:label}	<label for='%%id%%' class='switch_label %%name%%'>%%label%%</label> {/if:label}
<div class='input switch_button %%name%%'>
		<label for='%%id%%' tabindex='0'>
		<input type='checkbox' name='%%name%%' id='%%id%%' data-field='%%name%%'
			value='%%value%%'
			%%checked%%
			tabindex='-1'
			{if:disabled} disabled {/if:disabled}
		/>

		<div class='the_switch' >

		{if:icon}	<i class='dashicons %%icon%%'></i>	{/if:icon}
		</div>
		</label>
		{if:error}<p class='error'>%%error%%</p>{/if:error}
		{if:warning}<p class='warning'>%%warning%%</p>{/if:warning}
		{if:help}<div class="help dashicons dashicons-info "><span>%%help%%</span></div>{/if:help}
</div>

```
