Difference between revisions of "Template:ReferenceForValue"

From Open Energy Information

(add help-block for adding notes to reference citations)
(add <nowiki> to help-block)
 
Line 33: Line 33:
 
<nowiki>{{{field|ReferenceFor</nowiki>{{{Fieldname|{{{1}}}}}}<nowiki>|list|delimiter=;|remote autocompletion|values from category=References}}}</nowiki>
 
<nowiki>{{{field|ReferenceFor</nowiki>{{{Fieldname|{{{1}}}}}}<nowiki>|list|delimiter=;|remote autocompletion|values from category=References}}}</nowiki>
 
<span class="help-block">Separate multiple references using a semicolon (;) delimiter (e.g.- reference 1; reference 2)</span>
 
<span class="help-block">Separate multiple references using a semicolon (;) delimiter (e.g.- reference 1; reference 2)</span>
<span class="help-block">To add a note to a reference, for citing a specific section, use the <nowiki>{{!}}</nowiki> template as follows: reference 1 {{!}} section a;</span>
+
<span class="help-block">To add a note to a reference, for citing a specific section, use the <nowiki>{{!}}</nowiki> template as follows: reference 1 <nowiki>{{!}}</nowiki> section a;</span>
 
</div>
 
</div>
 
</includeonly>
 
</includeonly>

Latest revision as of 15:39, 14 December 2016

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
  1. 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


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.