Đi tới nội dung
Mục
Fiesta

field-money

Biểu mẫu Các trường mà người ta gõ vào, ở những trạng thái mà một biểu mẫu thật đặt chúng vào. Mỗi cái nằm trong một rst-box có đệm, vì đó là tấm thẻ mà biểu mẫu nằm trong.

Một khoản tiền bằng một loại tiền tệ. Mã tiền tệ hiện cạnh nhãn và được gửi cùng biểu mẫu, nên nếu tiền tệ đổi trong lúc ai đó đang gõ thì sẽ bị phát hiện khi lưu.

Mỗi ví dụ đều hoạt động thật, nhưng các liên kết trong đó không dẫn đến đâu. HTML hiển thị mã đánh dấu để sao chép.

Trơn

Xem trước

Đặt đoạn này bên trong <section rst-box><form rst-form>.

<div rst-field>
  <label rst-field-label for="fm_bare">Giá vé <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>

Kèm một gợi ý

Xem trước

Đặt đoạn này bên trong <section rst-box><form rst-form>.

<div rst-field>
  <label rst-field-label for="fm_hint">Giá vé <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">Ví dụ: 12.50 hoặc €12.50.</small>
</div>

Kèm một lỗi

Xem trước

Đặt đoạn này bên trong <section rst-box><form rst-form>.

<div rst-field>
  <label rst-field-label for="fm_error">Giá vé <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">Hãy dùng dấu chấm cho phần thập phân, ví dụ 12.50.</small>
</div>