Difference between revisions of "Template:DataDropDown"
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{{value}}} | + | {{{value = {{{value|}}}}}} |
{{#eval:html | {{#eval:html | ||
− | |<select name="{{{name}}}" style="width:100%"> | + | |<select title="{{{value}}}" name="{{{name}}}" style="width:100%" {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{onchange|}}}|onchange="{{{onchange}}}"}}> |
{{#if:{{{empty|}}}|<option value="" {{#ifeq:{{{value|}}}||selected}}>{{{empty}}}</option>}} | {{#if:{{{empty|}}}|<option value="" {{#ifeq:{{{value|}}}||selected}}>{{{empty}}}</option>}} | ||
{{#arr:loop | {{#arr:loop | ||
| k = v | | k = v | ||
| {{{options}}} | | {{{options}}} | ||
− | | each = {{#if:{{{v|}}}|<option value="{{{v}}}" {{#ifeq:{{{v}}}|{{{value|}}}|selected}}>{{#title:pagename|{{{v}} | + | | each = {{#if:{{{v|}}}|<option value="{{{v}}}" {{#ifeq:{{{v}}}|{{{value|}}}|selected}}>{{#title:pagename|{{{v}}}}}</option>}} |
}} | }} | ||
</select> | </select> | ||
}} | }} |
Latest revision as of 17:04, 14 November 2018