Template:ReferenceForValue
From Open Energy Information
This is the ReferenceForValue template. It is used by forms to assign a references to values supplied in the form. This template will generate the additional form field necessary to collect the reference information for the provided form field.
Parameters
- Fieldname - The name of the form field containing the value to be referenced.
Note: Parameters can be called in numerical order, or using parameter name.
Dependencies
- Widget:ShowRefFieldsButton - Necessary to toggle the display of the reference fields, which are hidden by default.
Usage
Use within a form construct like this:
{{ReferenceForValue|MyField}}
to create a field called "Reference for MyField" which will collect a reference and apply it to the form's template as |ReferenceForMyField=
Example
For an example of this in use, please see the sample form.
Edit the page to see the template text.