Eliom 5.0 provides revised infrastructure for building HTML forms. The form constructors are now available under Eliom_content.Html5.D.Form (and Eliom_content.Html5.F.Form), which implement the signature Eliom_form_sigs.S.
The API has changed as demonstrated by the following example. What was previously Eliom_content.Html5.D.int_input ... () is now available as Eliom_content.Html5.D.Form.input ... Eliom_content.Html5.D.Form.int. (The dots correspond to the optional arguments, which generally haven't changed.) The same input combinator can be used for other types (float, int32, int64, nativeint, bool, and string). The same applies to other widgets, e.g., checkbox and radio.
Functions for building links (like a) remain unaffected by the above changes.
Eliom 5.0 is the first version of Eliom to provide a PPX syntax extension. While the older Camlp4 syntax extension is still available, we recommend that you plan to migrate to PPX, which is more actively developed. The Eliom manual provides instructions for migrating to our PPX syntax extension.
eliom-distillery now defaults to a PPX template (basic.ppx). The older Camlp4 template remains available as basic.camlp4.
Eliom code extensively uses Deriving_Json for (de)serializing OCaml data. The basic.ppx eliom-distillery template loads the corresponding PPX package (js_of_ocaml.deriving.ppx) by default. The latter package optionally gets built if ppx_deriving is present. We therefore recommend that you install ppx_deriving. If you are sure that your application does not need js_of_ocaml.deriving.ppx, remove the references to it from your distillery-generated Makefile.options.
- The signature of Eliom_client.onunload has changed to allow canceling unload. Refer to the API documentation for details.
- The signature of Eliom_content.Html5.D.a_for (and F.a_for) has been fixed. Its argument is now the ID of a form element, not a parameter name.
Please help us maintain this page by notifying us of any missing incompatible change. Thank you!