<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://tibiacraft.com/index.php?action=history&amp;feed=atom&amp;title=Template%3ASimplecalc_label%2Fdoc</id>
	<title>Template:Simplecalc label/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://tibiacraft.com/index.php?action=history&amp;feed=atom&amp;title=Template%3ASimplecalc_label%2Fdoc"/>
	<link rel="alternate" type="text/html" href="http://tibiacraft.com/index.php?title=Template:Simplecalc_label/doc&amp;action=history"/>
	<updated>2026-07-17T05:20:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://tibiacraft.com/index.php?title=Template:Simplecalc_label/doc&amp;diff=176&amp;oldid=prev</id>
		<title>Root: Created page with &quot;{{documentation header}} &lt;!-- documentation here --&gt; This template is borrowed from Wikipedia Template:Calculator label.  == Usage == Add a label for a field from {{tl|simplecalc}}. This associates the label with the element which is better for accessibility. It also means if you click on the label, it selects the field in question.  Generally you just set the &lt;code&gt;for&lt;/code&gt; parameter to the id of your calculator widget.  === Example ===...&quot;</title>
		<link rel="alternate" type="text/html" href="http://tibiacraft.com/index.php?title=Template:Simplecalc_label/doc&amp;diff=176&amp;oldid=prev"/>
		<updated>2025-10-04T19:03:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{documentation header}} &amp;lt;!-- documentation here --&amp;gt; This template is borrowed from Wikipedia &lt;a href=&quot;/index.php?title=W:Template:Calculator_label&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;W:Template:Calculator label (page does not exist)&quot;&gt;Template:Calculator label&lt;/a&gt;.  == Usage == Add a label for a field from {{tl|simplecalc}}. This associates the label with the element which is better for accessibility. It also means if you click on the label, it selects the field in question.  Generally you just set the &amp;lt;code&amp;gt;for&amp;lt;/code&amp;gt; parameter to the id of your calculator widget.  === Example ===...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{documentation header}}&lt;br /&gt;
&amp;lt;!-- documentation here --&amp;gt;&lt;br /&gt;
This template is borrowed from Wikipedia [[w:Template:Calculator label|Template:Calculator label]].&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Add a label for a field from {{tl|simplecalc}}. This associates the label with the element which is better for accessibility. It also means if you click on the label, it selects the field in question.&lt;br /&gt;
&lt;br /&gt;
Generally you just set the &amp;lt;code&amp;gt;for&amp;lt;/code&amp;gt; parameter to the id of your calculator widget.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{simplecalc|type=checkbox|id=mycheck}} {{simplecalc label|Label for checkbox|for=mycheck}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: thin dashed grey;padding:1em&amp;quot;&amp;gt;&lt;br /&gt;
{{simplecalc|type=checkbox|id=mycheck}} {{simplecalc label|Label for checkbox|for=mycheck}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Codex mode ===&lt;br /&gt;
If the codex parameter is set, then this label will be displayed in codex mode. In this mode you can also use the optional description and flag parameters.&lt;br /&gt;
&lt;br /&gt;
See https://doc.wikimedia.org/codex/latest/components/demos/label.html#guidelines for guidelines on how best to use codex labels.&lt;br /&gt;
&lt;br /&gt;
As an example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{Simplecalc label|codex=true|description=Short description text|label=Label text|flag=(optional)|for=foo}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;cdx-text-input&amp;quot;&amp;gt;{{simplecalc|type=text|class=cdx-text-input__input|default=42|id=foo}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Produces:&lt;br /&gt;
&amp;lt;div style=&amp;quot;border: thin dashed grey;padding:1em&amp;quot;&amp;gt;&lt;br /&gt;
{{Simplecalc label|codex=true|description=Short description text|label=Label text|flag=(optional)|for=foo}}&lt;br /&gt;
&amp;lt;div class=&amp;quot;cdx-text-input&amp;quot;&amp;gt;{{simplecalc|type=text|class=cdx-text-input__input|default=42|id=foo}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==TemplateData==&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
		&amp;quot;1&amp;quot;: {&lt;br /&gt;
			&amp;quot;aliases&amp;quot;: [&lt;br /&gt;
				&amp;quot;label&amp;quot;&lt;br /&gt;
			],&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Text for label&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;for&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;The id from the simplecalc template this label is for&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;class&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;CSS class or classes to add to label&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;class-live&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;CSS classes applied only when the gadget is enabled&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;codex&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Make this a codex style label&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;boolean&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;codex-class&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Extra class on the codex wrapper&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;cdx-radio__label&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;description&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;[codex mode only] Additional description text about the widget that is not part of the label&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;description-id&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;[codex mode only] id for the description element&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;flag&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;[Codex mode only] Additional information about the widget. Usually to mark a field as optional&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;(optional)&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;content&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;style&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;CSS for label&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;title&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Tooltip to show on hover&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;Way to add a label to a form control from Template:Simplecalc. Adding labels using this template helps ensure calculators are accessible&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{sandbox other||&lt;br /&gt;
&amp;lt;!-- template categories/interwikis here --&amp;gt;&lt;br /&gt;
[[Category:Simple calculator templates]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- documentation categories/interwikis here --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Root</name></author>
	</entry>
</feed>