package datakit-ci

  1. Overview
  2. Docs
type field_type = [
  1. | `Url
  2. | `Tel
  3. | `Text
  4. | `Time
  5. | `Search
  6. | `Password
  7. | `Checkbox
  8. | `Range
  9. | `Radio
  10. | `Submit
  11. | `Reset
  12. | `Number
  13. | `Hidden
  14. | `Month
  15. | `Week
  16. | `File
  17. | `Email
  18. | `Image
  19. | `Datetime_local
  20. | `Datetime
  21. | `Date
  22. | `Color
  23. | `Button
]
val form : State.t -> csrf_token:string -> form_class:string list -> action:string -> [< Html_types.form_content_fun Div ] Tyxml.Html.elt list -> [> Html_types.form ] Tyxml.Html.elt

form state ~csrf_token ~form_class ~action controls is an HTML form which posts the values to action. If state still contains any fields, they are reported as unknown-field errors.

val field : State.t -> string -> field_type -> string -> [> Html_types.div ] Tyxml.Html.elt

field state label type name is an HTML form control for entering a value of type type. If state contains a value for this field, that will be the initial value. If state contains an error for this field, it will be displayed (and removed from state).

OCaml

Innovation. Community. Security.