field
Label, input, optional hint, help and error. The general text-like control, with an explicit ID.
Bare
Put this inside <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_bare" >Title</label >
<input rst-input type ="text" id ="f_bare" name ="f_bare" >
</div >
Put this inside <section rst-box><form rst-form>.
{{ template "field" dict "ID" "f_bare" "Name" "f_bare" "Label" "Title" }}
With a hint
Put this inside <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_hint" >Slug <span rst-field-hint >(lowercase, no spaces)</span ></label >
<input rst-input type ="text" id ="f_hint" name ="f_hint" >
</div >
Put this inside <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_hint"
"Name" "f_hint"
"Label" "Slug"
"Hint" "lowercase, no spaces" }}
With help under the control
Put this inside <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_help" >Email</label >
<input rst-input type ="email" id ="f_help" name ="f_help" autocomplete ="email" aria-describedby ="f_help-help" >
<p rst-field-help id ="f_help-help" >We only use this to send you replies.</p >
</div >
Put this inside <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_help"
"Name" "f_help"
"Label" "Email"
"Type" "email"
"Help" "We only use this to send you replies."
"Autocomplete" "email" }}
Required
Put this inside <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_required" >Full name</label >
<input rst-input type ="text" id ="f_required" name ="f_required" required >
</div >
Put this inside <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_required"
"Name" "f_required"
"Label" "Full name"
"Required" true }}
With an error
Put this inside <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_error" >Email</label >
<input rst-input type ="email" id ="f_error" name ="f_error" value ="grace@" aria-invalid ="true" aria-describedby ="f_error-error" >
<p rst-field-error id ="f_error-error" role ="alert" >That does not look like an email address.</p >
</div >
Put this inside <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_error"
"Name" "f_error"
"Label" "Email"
"Type" "email"
"Error" "That does not look like an email address."
"Value" "grace@" }}
Short
Put this inside <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_short" >Postcode</label >
<input rst-input ="short" type ="text" id ="f_short" name ="f_short" value ="D02 XY45" >
</div >
Put this inside <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_short"
"Name" "f_short"
"Label" "Postcode"
"Short" true
"Value" "D02 XY45" }}
The headline field
Put this inside <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_primary" >Title</label >
<input rst-input ="primary" type ="text" id ="f_primary" name ="f_primary" value ="Quarterly board meeting" >
</div >
Put this inside <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_primary"
"Name" "f_primary"
"Label" "Title"
"Primary" true
"Value" "Quarterly board meeting" }}