Author: kwwilliams
Description:
A lot of templates have arguments that are effectively enumeration types. Using the singlechart template from English Wikipedia as an example, the first argument has a limited range of actual values: things like UKrock, UKdance, UKdownload, Billboardhot100, etc. The template is structured as a switch statement that only does anything useful if it recognises the chart name. Otherwise, it just spits out a big red error message.
It would be good if I could encode that in the template data, something like
"1": { "label": "Chart identifier", "description": "Chart name: recognized values are listed at", "type": "enum", "values": { "UKrock", "UKdance", "UKdownload", "Billboardhot100" } "required": true }
The template edit should then not allow freeform text entry while entering the template. Instead, it should provide a menu selection that only allows the editor to enter one of the recognized values.
Version: unspecified
Severity: normal