Sjabloon:Token field: verschil tussen versies

Uit Auditpedia
Ga naar:navigatie, zoeken
 
Regel 21: Regel 21:
 
  -->{{#caunique:$token options}}<!--  
 
  -->{{#caunique:$token options}}<!--  
 
  -->{{#vardefine: $multiple |{{{Multiple|}}} }}<!--  
 
  -->{{#vardefine: $multiple |{{{Multiple|}}} }}<!--  
  --><wstoken name="{{{Field name|}}}[]" class="form-control" multiple="{{#var: $multiple}}" id="tokens-{{{ID|}}}" {{#if: {{{Required|}}} |required="{{{Required|}}}"|}}>
+
  --><wstoken name="{{{Field name|}}}[]" class="form-control" multiple="{{#var: $multiple}}" id="tokens-{{{ID|}}}" required="{{{Required|}}}">
 
{{#tag:wsfield||type=option|value=}}
 
{{#tag:wsfield||type=option|value=}}
 
   {{#camap:$token options|__Optie__|{{#tag:wsfield|__Optie__|type=option|value=__Optie__|selected={{#if: {{#casearch:$selected values|__Optie__}}|selected}} |}} }}  
 
   {{#camap:$token options|__Optie__|{{#tag:wsfield|__Optie__|type=option|value=__Optie__|selected={{#if: {{#casearch:$selected values|__Optie__}}|selected}} |}} }}  
 
</wstoken>
 
</wstoken>
 
</includeonly>
 
</includeonly>

Huidige versie van 17 feb 2022 om 12:41

This is the "Token field" template. It should be called in the following format:

{{Token field
|Field name=Name of the field
|ID=Mandatory. Meaningful name for field.
|Available values=comma seperated string of available values.
|Selected values=comma seperated string of selected values. These are the current parameter values.
|Multiple=
|Required=
}}

The purpose of this template is to make it easy to create a token field. Edit the page to see the template text.