Vorlage:Feldgenerator: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Maggus (Diskussion | Beiträge) K ((bugfix)) |
Maggus (Diskussion | Beiträge) K ((Syntax)) |
||
Zeile 11: | Zeile 11: | ||
<pre> | <pre> | ||
{{Feldgenerator | {{Feldgenerator | ||
− | | Handlungsorte | + | |Handlungsorte |
}} | }} | ||
</pre> | </pre> | ||
Zeile 17: | Zeile 17: | ||
<table> | <table> | ||
{{Feldgenerator | {{Feldgenerator | ||
− | | Handlungsorte | + | |Handlungsorte |
}} | }} | ||
</table> | </table> | ||
Zeile 31: | Zeile 31: | ||
////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////// | ||
/// ermittle das Attribut | /// ermittle das Attribut | ||
− | -->{{#vardefine: Attribut | {{{1}}} }}<!-- | + | -->{{#vardefine: Attribut |{{{1}}} }}<!-- |
////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////// | ||
Zeile 44: | Zeile 44: | ||
### erzeuge den Hilfetext als #info-Funktion | ### erzeuge den Hilfetext als #info-Funktion | ||
--><td class="formtable.help" ><!-- | --><td class="formtable.help" ><!-- | ||
− | -->{{#info: {{#show: Attribut:{{#var:Attribut}} | ?Hilfetext Attribut# }} }}<!-- | + | -->{{#info: {{#show: Attribut:{{#var:Attribut}} |?Hilfetext Attribut# }} }}<!-- |
--></td><!-- | --></td><!-- | ||
### zeige das Label an | ### zeige das Label an | ||
--><td class="formtable.label" ><!-- | --><td class="formtable.label" ><!-- | ||
− | -->{{#show: Attribut:{{#var:Attribut}} | ?Label# | default={{#var:Attribut}} }}<!-- | + | -->{{#show: Attribut:{{#var:Attribut}} |?Label# |default={{#var:Attribut}} }}<!-- |
--></td><!-- | --></td><!-- | ||
Zeile 61: | Zeile 61: | ||
-->{{#var:Attribut}}<!-- | -->{{#var:Attribut}}<!-- | ||
### input type | ### input type | ||
− | -->{{#show: Attribut:{{#var:Attribut}} | ?input type# | intro= {{!}}input type= }}<!-- | + | -->{{#show: Attribut:{{#var:Attribut}} |?input type# |intro= {{!}}input type= }}<!-- |
### Auswahlliste | ### Auswahlliste | ||
− | -->{{#if: {{#show: Attribut:{{#var:Attribut}} | ?values from }}<!-- | + | -->{{#if: {{#show: Attribut:{{#var:Attribut}} |?values from }}<!-- |
− | -->| {{#show: Attribut:{{#var:Attribut}} | ?values from# | intro= {{!}} }} <!-- | + | -->|{{#show: Attribut:{{#var:Attribut}} |?values from# |intro= {{!}} }}<!-- |
− | --> {{#show: Attribut:{{#var:Attribut}} | ?values# | intro== }} <!-- | + | -->{{#show: Attribut:{{#var:Attribut}} |?values# |intro== }}<!-- |
-->|}}<!-- | -->|}}<!-- | ||
### label | ### label | ||
− | -->{{#show: Attribut:{{#var:Attribut}} | ?label# | default={{#var:Attribut}} | intro = {{!}}label= }}<!-- | + | -->{{#show: Attribut:{{#var:Attribut}} |?label# |default={{#var:Attribut}} |intro = {{!}}label= }}<!-- |
### Hilfetext Attribut | ### Hilfetext Attribut | ||
− | -->{{#show: Attribut:{{#var:Attribut}} | ?Hilfetext Attribut# | intro = {{!}}tooltip= }}<!-- | + | -->{{#show: Attribut:{{#var:Attribut}} |?Hilfetext Attribut# |intro = {{!}}tooltip= }}<!-- |
### placeholder | ### placeholder | ||
− | -->{{#show: Attribut:{{#var:Attribut}} | ?placeholder# | intro = {{!}}placeholder= }}<!-- | + | -->{{#show: Attribut:{{#var:Attribut}} |?placeholder# |intro = {{!}}placeholder= }}<!-- |
### mandatory | ### mandatory | ||
− | -->{{#if: {{#show: Attribut:{{#var:Attribut}} | ?mandatory }}<!-- | + | -->{{#if: {{#show: Attribut:{{#var:Attribut}} |?mandatory }}<!-- |
− | -->| {{!}}mandatory <!-- | + | -->|{{!}}mandatory<!-- |
-->}}<!-- | -->}}<!-- | ||
### existing values only | ### existing values only | ||
− | -->{{#if: {{#show: Attribut:{{#var:Attribut}} | ?existing values only}}<!-- | + | -->{{#if: {{#show: Attribut:{{#var:Attribut}} |?existing values only}}<!-- |
− | -->| {{!}}existing values only<!-- | + | -->|{{!}}existing values only<!-- |
-->}}<!-- | -->}}<!-- | ||
### autogrow | ### autogrow | ||
− | -->{{#if: {{#show: Attribut:{{#var:Attribut}} | ?autogrow}}<!-- | + | -->{{#if: {{#show: Attribut:{{#var:Attribut}} |?autogrow}}<!-- |
− | -->| {{!}}autogrow{{!}}rows=1<!-- | + | -->|{{!}}autogrow{{!}}rows=1<!-- |
-->}}<!-- | -->}}<!-- | ||
### uploadable | ### uploadable | ||
− | -->{{#if: {{#show: Attribut:{{#var:Attribut}} | ?uploadable }}<!-- | + | -->{{#if: {{#show: Attribut:{{#var:Attribut}} |?uploadable }}<!-- |
− | -->| {{!}}uploadable{{!}}image preview <!-- | + | -->|{{!}}uploadable{{!}}image preview<!-- |
-->}}<!-- | -->}}<!-- | ||
Version vom 9. Oktober 2020, 08:46 Uhr
Dies ist die Vorlage „Feldgenerator“. Sie sollte im folgenden Format genutzt werden:
{{Feldgenerator|<Attribut>}}
wobei <Attribut> (Pflichtangabe) der Attributsname ist, aus dem heraus das Formularfeld generiert wird (ohne den Namespace, also zum Beispiel "Wappen" statt "Attribut:Wappen").
Beispiel
Eingabe
{{Feldgenerator |Handlungsorte }}
Ausgabe
An welche Orte führt uns diese Publikation? | Handlungsorte | {{{field|Handlungsorte|input type=tokens|values from category=Handlungsort|label=Handlungsorte|tooltip=An welche Orte führt uns diese Publikation?|placeholder=optional|existing values only}}} |
Klick auf „Bearbeiten“, um den Quelltext der Vorlage anzusehen.