field-money
フォーム 実際のフォームが取らせる状態で、人が文字を入力する欄を並べています。どれも余白のある rst-box の中に入っています。フォームを入れるカードがそれだからです。
1 つの通貨での金額です。通貨コードはラベルの横に表示され、フォームと一緒に送信されるので、入力中に通貨が変わった場合は保存時に検出されます。
どの例も実際に動きますが、リンクはどこにも移動しません。 HTML にはコピーできるマークアップがあります。
素のまま
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="fm_bare" >チケット価格 <span class ="rst-mono" >EUR</span ></label >
<input rst-input id ="fm_bare" name ="fm_bare" type ="text" inputmode ="decimal" >
<input type ="hidden" name ="fm_bare.locale" value ="en" >
<input type ="hidden" name ="fm_bare.currency" value ="EUR" >
<input type ="hidden" name ="fm_bare.seed" value ="" >
</div >
ヒントつき
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="fm_hint" >チケット価格 <span class ="rst-mono" >EUR</span ></label >
<input rst-input id ="fm_hint" name ="fm_hint" type ="text" inputmode ="decimal" aria-describedby ="fm_hint-hint" >
<input type ="hidden" name ="fm_hint.locale" value ="en" >
<input type ="hidden" name ="fm_hint.currency" value ="EUR" >
<input type ="hidden" name ="fm_hint.seed" value ="" >
<small rst-field-hint id ="fm_hint-hint" >例: 12.50 または €12.50。</small >
</div >
エラーつき
これは <section rst-box><form rst-form> の中に置きます。
<div rst-field >
<label rst-field-label for ="fm_error" >チケット価格 <span class ="rst-mono" >EUR</span ></label >
<input rst-input id ="fm_error" name ="fm_error" type ="text" inputmode ="decimal" value ="12,.50" aria-invalid ="true" aria-describedby ="fm_error-error" >
<input type ="hidden" name ="fm_error.locale" value ="en" >
<input type ="hidden" name ="fm_error.currency" value ="EUR" >
<input type ="hidden" name ="fm_error.seed" value ="" >
<small rst-field-error id ="fm_error-error" >小数点にはピリオドを使ってください(例: 12.50)。</small >
</div >