field
Nhãn, ô nhập, gợi ý tuỳ chọn, trợ giúp và lỗi. Điều khiển dạng chữ thông thường, có ID rõ ràng.
Trơn
Đặt đoạn này bên trong <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_bare" >Tiêu đề</label >
<input rst-input type ="text" id ="f_bare" name ="f_bare" >
</div >
Đặt đoạn này bên trong <section rst-box><form rst-form>.
{{ template "field" dict "ID" "f_bare" "Name" "f_bare" "Label" "Tiêu đề" }}
Kèm một gợi ý
Đặt đoạn này bên trong <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_hint" >Đường dẫn rút gọn <span rst-field-hint >(chữ thường, không có dấu cách)</span ></label >
<input rst-input type ="text" id ="f_hint" name ="f_hint" >
</div >
Đặt đoạn này bên trong <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_hint"
"Name" "f_hint"
"Label" "Đường dẫn rút gọn"
"Hint" "chữ thường, không có dấu cách" }}
Kèm trợ giúp bên dưới điều khiển
Đặt đoạn này bên trong <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" >Chúng tôi chỉ dùng nó để gửi phản hồi cho bạn.</p >
</div >
Đặt đoạn này bên trong <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_help"
"Name" "f_help"
"Label" "Email"
"Type" "email"
"Help" "Chúng tôi chỉ dùng nó để gửi phản hồi cho bạn."
"Autocomplete" "email" }}
Bắt buộc
Đặt đoạn này bên trong <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_required" >Họ và tên</label >
<input rst-input type ="text" id ="f_required" name ="f_required" required >
</div >
Đặt đoạn này bên trong <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_required"
"Name" "f_required"
"Label" "Họ và tên"
"Required" true }}
Kèm một lỗi
Đặt đoạn này bên trong <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" >Đó có vẻ không phải là địa chỉ email.</p >
</div >
Đặt đoạn này bên trong <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_error"
"Name" "f_error"
"Label" "Email"
"Type" "email"
"Error" "Đó có vẻ không phải là địa chỉ email."
"Value" "grace@" }}
Ngắn
Đặt đoạn này bên trong <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_short" >Mã bưu chính</label >
<input rst-input ="short" type ="text" id ="f_short" name ="f_short" value ="D02 XY45" >
</div >
Đặt đoạn này bên trong <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_short"
"Name" "f_short"
"Label" "Mã bưu chính"
"Short" true
"Value" "D02 XY45" }}
Trường chính
Đặt đoạn này bên trong <section rst-box><form rst-form>.
<div rst-field >
<label rst-field-label for ="f_primary" >Tiêu đề</label >
<input rst-input ="primary" type ="text" id ="f_primary" name ="f_primary" value ="Cuộc họp hội đồng quý" >
</div >
Đặt đoạn này bên trong <section rst-box><form rst-form>.
{{ template "field" dict
"ID" "f_primary"
"Name" "f_primary"
"Label" "Tiêu đề"
"Primary" true
"Value" "Cuộc họp hội đồng quý" }}