field
表單 人會打字入去嘅欄位,處於真正表格會令佢哋出現嘅狀態。每個都放喺一個有留白嘅 rst-box 入面,因為表格就係放喺呢種卡片入面。
標籤、輸入框、可選提示、說明同錯誤。一般嘅文字類控件,有明確 ID。
每個例子都真係用得,不過入面啲連結唔會帶你去邊度。 HTML 顯示可以複製嘅標記。
最簡單
將呢段放入 <section rst-box><form rst-form> 入面。
<div rst-field >
<label rst-field-label for ="f_bare" >標題</label >
<input rst-input type ="text" id ="f_bare" name ="f_bare" >
</div >
帶一句提示
將呢段放入 <section rst-box><form rst-form> 入面。
<div rst-field >
<label rst-field-label for ="f_hint" >網址代號 <span rst-field-hint >(細楷,唔好有空格)</span ></label >
<input rst-input type ="text" id ="f_hint" name ="f_hint" >
</div >
控制項下面有一行說明
將呢段放入 <section rst-box><form rst-form> 入面。
<div rst-field >
<label rst-field-label for ="f_help" >電郵</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" >我哋只會用佢嚟寄回覆俾你。</p >
</div >
必填
將呢段放入 <section rst-box><form rst-form> 入面。
<div rst-field >
<label rst-field-label for ="f_required" >全名</label >
<input rst-input type ="text" id ="f_required" name ="f_required" required >
</div >
帶一個錯誤
將呢段放入 <section rst-box><form rst-form> 入面。
<div rst-field >
<label rst-field-label for ="f_error" >電郵</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" >呢個唔似係電郵地址。</p >
</div >
窄
將呢段放入 <section rst-box><form rst-form> 入面。
<div rst-field >
<label rst-field-label for ="f_short" >郵遞區號</label >
<input rst-input ="short" type ="text" id ="f_short" name ="f_short" value ="D02 XY45" >
</div >
主要欄位
將呢段放入 <section rst-box><form rst-form> 入面。
<div rst-field >
<label rst-field-label for ="f_primary" >標題</label >
<input rst-input ="primary" type ="text" id ="f_primary" name ="f_primary" value ="季度董事會會議" >
</div >