The original script is from the Fire Emblem Wiki.

Description

This template must come with Template:Field, Template:Field/end, Template:Selector/end for all to function properly. They are used to display content by selecting a corresponding option from the Select menu. On mobile, all fields will be visible.

Note: While identical, Template:Field/end and Template:Selector/end are both used to differentiate the two </div>. Please use these templates instead of manually writing the code.

Usage

Selector

Place {{Selector}} on top of a section.

Field

Central template for this set of templates. Place the content you want to display directly between this and Field/end.

Parameters:
{{Field| <name> }}

Field/end

Place {{Field/end}} after the content to end a field.

Selector/end

Place {{Selector/end}} to end a selector.

Demo

Input
Options: {{Selector}}
{{Field|Option 1}}
This is field 1
{{Field/end}}
{{Field|Option 2}}
This is field 2
{{Field/end}}
{{Field|Option 3}}
This is field 3
{{Field/end}}
{{Selector/end}}
Output
Options:
Option 1

This is field 1

Option 2

This is field 2

Option 3

This is field 3

Community content is available under CC-BY-SA unless otherwise noted.