package bonsai

  1. Overview
  2. Docs
A library for building dynamic webapps, using Js_of_ocaml

Install

Dune Dependency

Authors

Maintainers

Sources

v0.15.1.tar.gz
sha256=0c4a714146073f421f1a6179561f836b45d8dc012c743207d3481ea63bef74bf

doc/bonsai.web_ui_form/Bonsai_web_ui_form/Submit/index.html

Module Bonsai_web_ui_form.SubmitSource

Sourcetype 'a t

Creates a "submit" handler, which is intended to be used by the view_as_vdom function.

  • handle_enter: when true, will render the form inside of a <form> element, which gives us the ability to add an "on_submit" handler which detecs people hitting "enter" when a form element is focused. The default is true. Set it to false to disable this behavior.
  • button: When Some, will append a button with the label given by its contents. will be added to the end of the form. If the form is currently invalid, the button will be disabled. The default is Some "Submit". Explicitly set it to None to remove the button entirely.
  • f: the function which is run when the form is submitted.
Sourceval create : ?handle_enter:bool -> ?button:string option -> f:('a -> unit Ui_effect.t) -> unit -> 'a t
OCaml

Innovation. Community. Security.