package tiny_languages

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module FormsSource

Sourcetype kind =
  1. | Text
  2. | Password
  3. | Checkbox
  4. | Radio
  5. | Submit
  6. | Reset
  7. | Button
  8. | Hidden
  9. | Select of (string * string) list
  10. | Textarea
Sourcetype value = {
  1. text : string;
  2. checked : bool;
  3. selected : int;
}
Sourcetype control = {
  1. element : Dom.element;
  2. kind : kind;
  3. name : string option;
  4. initial : value;
}
Sourcetype form = {
  1. action : string;
  2. post : bool;
  3. controls : control list;
}
Sourceval control : Dom.element -> control option
Sourceval label : control -> string
Sourceval forms : Dom.element -> form list
Sourceval form_of : form list -> Dom.element -> form option
Sourceval submission : form -> value:(Dom.element -> value) -> submitter:Dom.element option -> (string * string) list