PC Gaming Shelter
An archive dedicated to preserving PC Gaming history and more

Template:Form row/doc: Difference between revisions

From PC Gaming Shelter
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 30: Line 30:
|{{{field
|{{{field
   |Field name
   |Field name
   |input type=text
   |input type=tokens
   |class=form-control
   |class=form-control
  |property=Has property
  }}}
  }}}
|label=Field label
|label=Field label
Line 38: Line 39:
}}
}}
</pre>
</pre>
Please note that the <code>property</code> parameters in the template call and in the field definition work differently: in the field block, the parameter is used to extract the list of the allowed values from the property page, while the template parameter is used to retrieve the property description via [[Template:Property description]].
'''If used consistently across the [[Special:Forms|page forms]], the template allows for modifying the appearance and behavior of all rows in all forms.'''

Latest revision as of 09:44, 26 March 2026

A helper template for rendering a PageForms row.

Template parameters

ParameterDescriptionTypeStatus
Field markup1

The first unnamed parameter expects a PageForms field definition.

Unbalanced wikitextoptional
CSS classclass

no description

Stringoptional
Field label textlabel

no description

Stringoptional
Name of semantic propertyproperty

Used to deliver the property description, if any, the the form field definition.

Stringoptional

Example

{{form row
|{{{field
  |Field name
  |input type=tokens
  |class=form-control
  |property=Has property
 }}}
|label=Field label
|property=Has property
|class=class-name
}}

Please note that the property parameters in the template call and in the field definition work differently: in the field block, the parameter is used to extract the list of the allowed values from the property page, while the template parameter is used to retrieve the property description via Template:Property description.

If used consistently across the page forms, the template allows for modifying the appearance and behavior of all rows in all forms.