This is server API (go to client)

Module Eliom_output.​HtmlText

module HtmlText : sig..end

Eliom service registration and forms creation for untyped HTML page. This an instance of both the Eliom_output.​Registration and Eliom_output.​Forms abstract signatures. The page content is a string that must contains valid HTML and the content type is always text/html.


Service registration

val register : 
  ?scope:[< Eliom_common.scope ] ->
  ?options:unit ->
  ?charset:string ->
  ?code:int ->
  ?content_type:string ->
  ?headers:Http_headers.t ->
  ?secure_session:bool ->
  service:('a, 'b, [< Eliom_services.internal_service_kind ],
   [< Eliom_services.suff ], 'c, 'd, [ `Registrable ],
   Eliom_output.http_service)
   Eliom_services.service ->
  ?error_handler:((string * exn) list -> string Lwt.t) ->
  ('a -> 'b -> string Lwt.t) -> unit

The function register service handler will associate the service to the function handler. The handler function take two parameters, the GET and POST parameters of the current HTTP request, and should returns the corresponding page.

The optional parameter ~scope is Eliom_common.​global by default, see the Eliom manual for detailled description of different scope.

The optional parameter ~options is specific to each output module, see the type description for more information.

The optional parameters ?charset, ?code, ?content_type and ?headers can be used to modify the HTTP answer sent by Eliom. Use this with care.

The optionnal parameter ~secure_session has no effect for scope Eliom_common.​global. With other scopes, the parameter is used to force the session service table in which the handler will be registered. By default, the service is registred in the unsecure session if the current request's protocol is http, or in the secure session if the protocol is https. If set to false (resp. true) the handler will be stored in the unsecure (resp. secure) session. See the Eliom manual for an introduction to secure state.

The optional parameter ~error_handler is used to specialize the error page when actual parameters aren't compatible with the expected type. The default error handler is fun l -> raise (Eliom_common.​Eliom_Typing_Errorl).

val register_service : 
  ?scope:[< Eliom_common.scope ] ->
  ?options:unit ->
  ?charset:string ->
  ?code:int ->
  ?content_type:string ->
  ?headers:Http_headers.t ->
  ?secure_session:bool ->
  ?https:bool ->
  ?priority:int ->
  path:Eliom_pervasives.Url.path ->
  get_params:('a, [< Eliom_services.suff ] as 'b, 'c)
   Eliom_parameters.params_type ->
  ?error_handler:((string * exn) list -> string Lwt.t) ->
  ('a -> unit -> string Lwt.t) ->
  ('a, unit,
   [> `Attached of
   ([> `Internal of [> `Service ] ], [> `Get ]) Eliom_services.a_s ],
   'b, 'c, unit, [< Eliom_services.registrable > `Registrable ],
   Eliom_output.http_service)
  Eliom_services.service
val register_coservice : 
  ?scope:[< Eliom_common.scope ] ->
  ?options:unit ->
  ?charset:string ->
  ?code:int ->
  ?content_type:string ->
  ?headers:Http_headers.t ->
  ?secure_session:bool ->
  ?name:string ->
  ?csrf_safe:bool ->
  ?csrf_scope:[< Eliom_common.user_scope ] ->
  ?csrf_secure:bool ->
  ?max_use:int ->
  ?timeout:float ->
  ?https:bool ->
  fallback:(unit, unit,
   [ `Attached of
   ([ `Internal of [ `Service ] ], [ `Get ])
   Eliom_services.a_s ],
   [ `WithoutSuffix ], unit, unit,
   [< Eliom_services.registrable ], Eliom_output.http_service)
   Eliom_services.service ->
  get_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameters.params_type ->
  ?error_handler:((string * exn) list -> string Lwt.t) ->
  ('a -> unit -> string Lwt.t) ->
  ('a, unit,
   [> `Attached of
   ([> `Internal of [> `Coservice ] ], [> `Get ])
   Eliom_services.a_s ],
   [ `WithoutSuffix ], 'b, unit,
   [< Eliom_services.registrable > `Registrable ],
   Eliom_output.http_service)
  Eliom_services.service
val register_coservice' : 
  ?scope:[< Eliom_common.scope ] ->
  ?options:unit ->
  ?charset:string ->
  ?code:int ->
  ?content_type:string ->
  ?headers:Http_headers.t ->
  ?secure_session:bool ->
  ?name:string ->
  ?csrf_safe:bool ->
  ?csrf_scope:[< Eliom_common.user_scope ] ->
  ?csrf_secure:bool ->
  ?max_use:int ->
  ?timeout:float ->
  ?https:bool ->
  get_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameters.params_type ->
  ?error_handler:((string * exn) list -> string Lwt.t) ->
  ('a -> unit -> string Lwt.t) ->
  ('a, unit, [> `Nonattached of [> `Get ] Eliom_services.na_s ],
   [ `WithoutSuffix ], 'b, unit,
   [< Eliom_services.registrable > `Registrable ],
   Eliom_output.http_service)
  Eliom_services.service
val register_post_service : 
  ?scope:[< Eliom_common.scope ] ->
  ?options:unit ->
  ?charset:string ->
  ?code:int ->
  ?content_type:string ->
  ?headers:Http_headers.t ->
  ?secure_session:bool ->
  ?https:bool ->
  ?priority:int ->
  fallback:('a, unit,
   [ `Attached of
   ([ `Internal of [ `Coservice | `Service ] ], [ `Get ])
   Eliom_services.a_s ],
   [< Eliom_services.suff ] as 'b, 'c, unit, [<
   `Registrable ], 'd)
   Eliom_services.service ->
  post_params:('e, [ `WithoutSuffix ], 'f) Eliom_parameters.params_type ->
  ?error_handler:((string * exn) list -> string Lwt.t) ->
  ('a -> 'e -> string Lwt.t) ->
  ('a, 'e,
   [> `Attached of
   ([> `Internal of [ `Coservice | `Service ] ], [> `Post ])
   Eliom_services.a_s ],
   'b, 'c, 'f, [< Eliom_services.registrable > `Registrable ],
   Eliom_output.http_service)
  Eliom_services.service
val register_post_coservice : 
  ?scope:[< Eliom_common.scope ] ->
  ?options:unit ->
  ?charset:string ->
  ?code:int ->
  ?content_type:string ->
  ?headers:Http_headers.t ->
  ?secure_session:bool ->
  ?name:string ->
  ?csrf_safe:bool ->
  ?csrf_scope:[< Eliom_common.user_scope ] ->
  ?csrf_secure:bool ->
  ?max_use:int ->
  ?timeout:float ->
  ?https:bool ->
  fallback:('a, unit,
   [ `Attached of
   ([ `Internal of [< `Coservice | `Service ] ], [ `Get ])
   Eliom_services.a_s ],
   [< Eliom_services.suff ] as 'b, 'c, unit, [<
   `Registrable ], Eliom_output.http_service)
   Eliom_services.service ->
  post_params:('d, [ `WithoutSuffix ], 'e) Eliom_parameters.params_type ->
  ?error_handler:((string * exn) list -> string Lwt.t) ->
  ('a -> 'd -> string Lwt.t) ->
  ('a, 'd,
   [> `Attached of
   ([> `Internal of [> `Coservice ] ], [> `Post ])
   Eliom_services.a_s ],
   'b, 'c, 'e, [< Eliom_services.registrable > `Registrable ],
   Eliom_output.http_service)
  Eliom_services.service
val register_post_coservice' : 
  ?scope:[< Eliom_common.scope ] ->
  ?options:unit ->
  ?charset:string ->
  ?code:int ->
  ?content_type:string ->
  ?headers:Http_headers.t ->
  ?secure_session:bool ->
  ?name:string ->
  ?csrf_safe:bool ->
  ?csrf_scope:[< Eliom_common.user_scope ] ->
  ?csrf_secure:bool ->
  ?max_use:int ->
  ?timeout:float ->
  ?keep_get_na_params:bool ->
  ?https:bool ->
  post_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameters.params_type ->
  ?error_handler:((string * exn) list -> string Lwt.t) ->
  (unit -> 'a -> string Lwt.t) ->
  (unit, 'a, [> `Nonattached of [> `Post ] Eliom_services.na_s ],
   [ `WithoutSuffix ], unit, 'b,
   [< Eliom_services.registrable > `Registrable ],
   Eliom_output.http_service)
  Eliom_services.service

Low-level function

val send : 
  ?options:unit ->
  ?charset:string ->
  ?code:int ->
  ?content_type:string ->
  ?headers:Http_headers.t ->
  string ->
  (Eliom_output.browser_content, Eliom_output.http_service)
  Eliom_output.kind Lwt.t

The function send page build the HTTP frame corresponding to page. This may be used for example in an service handler registered with Eliom_output.​Any.​register or when building a custom output module.

Forms creation

Links and forms

val make_uri : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, unit,
   [< Eliom_services.registrable ], 'c)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set -> 'a -> string

The function make_uri service get_params returns the URL of the service service applied to the GET parameters get_params. By default the returned URL is relative to the current request URL but it is absolute when one of the following conditions is met:

  • the optional parameter ~absolute_path is true.
  • the optional parameter ~absolute is true.
  • the optional parameter ~https is true (resp. false) and the current request protocol is http (resp. https).
  • the optional parameter ~https is true and the function is used outside of a service handler
  • the service has been created with ~https:true and the current request protocol is http.
  • the service has been created with ~https:true and the function is used outside of a service handler.

When only the first condition is met (~absolute_path is true) the returned URL is just the absolute path, but when any other condition is satisfied the returned URL is prefixed with protocol://hostname[:port], where:

  • protocol is:
    • https if the service has been created with ~https:true or the optional paramater ~https is true;
    • http if the optional paramater ~https is false;
    • the current request protocol if available;
    • http in any other case.
  • hostname is:
    • the optional parameter ~hostname if given;
    • the attribute defaulthostname of <host> tag in configuration file or the machine hostname if the option <usedefaulthostname/> is set;
    • the Host http header of the current request if available;
    • the attribute defaulthostname of <host> tag in configuration file or the machine hostname in any other case.

7 - port is: the optional parameter ~port if given; the attribute defaulthttpsport (resp. defaulthttpport) of <host> tag in configuration file or 443 (resp. 80) if protocol is https (resp. http) and the current request protocol is http (resp. https); the attribute defaulthttpsport (resp. defaulthttpsport) of <host> tag in configuration file or 443 (resp. 80) if the option <usedefaulthostname/> is set and protocol is https (resp. http); the port associated to the Host http header of the current request if available; the incoming port of the current request if available; the attribute defaulthttpport (resp. defaulthttpsport) of <host> tag in configuration file or 80 (resp. 443) in any other case.

If given the optional parameter ~fragment is prefixed by # and appended to the URL.

The optional parameter keep_nl_params allows to override the keep_nl_params parameter used when creating the service, see Eliom_services.​service for a detailled description.

The optional paramater nl_params allows to add non localized GET parameter to the URL. See the eliom manual for more information about non localized parameters.

val make_string_uri : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, unit,
   [< Eliom_services.registrable ], 'c)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set -> 'a -> string

The function make_string_uri service get_params returns the URL of the of the service service applied to the GET parameters get_params. See Eliom_output.​HtmlText.​make_uri for a detailled description of optional parameters.

The function make_string_uri is an alias of Eliom_uri.​make_string_uri.

Warning: The function make_string_uri should not be called outside of a service handler, unless one of the following condition is met:

  • the optional parameter ~absolute_path is true.
  • the optional parameter ~absolute is true.
  • the optional parameter ~https is true.
  • the service has been created with ~https:true.
  • the service is an external service.
val uri_of_string : (unit -> string) -> string

The function uri_of_string f returns a URI whose content is equivalent to f ().

For XML tree build with TyXML, like HTML5.M, XHTML.M or SVG.M, the function f is applied each time the XML tree is sent to the client (either as page content or as a marshalled OCaml value). Hence, the function is always evaluated in the context of a service handler.

For other module, the function f is immediatly applied.

val make_uri_components : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, unit,
   [< Eliom_services.registrable ], 'c)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  'a -> string * (string * string) list * string option

The function make_uri_components service get_params returns the a triplet (path, get_params, fragment) that is a decomposition of the URL for the service service applied to the GET parameters get_params. By default the returned path is relative to the current request URL but it could be absolute URL in some situation, see Eliom_output.​HtmlText.​make_uri for more information and a description of optional parameters.

The function make_uri_components is an alias for Eliom_uri.​make_uri_components.

Warning: depending on the optional parameters, the function make_uri_components may not be used outside of a service handler. See Eliom_output.​HtmlText.​make_string_uri for a detailled description.

val make_post_uri_components : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  service:('a, 'b, [< Eliom_services.post_service_kind ],
   [< Eliom_services.suff ], 'c, 'd,
   [< Eliom_services.registrable ], 'e)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?keep_get_na_params:bool ->
  'a ->
  'b ->
  string * (string * string) list * string option *
  (string * string) list

Same a Eliom_output.​HtmlText.​make_uri_components, but also returns a list of post parameters.

val a : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  ?a:string ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, unit,
   [< Eliom_services.registrable ], 'c)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?no_appl:bool -> string -> 'a -> string

The function a service a_content get_params creates a <a> node that link to service applied to GET parameters get_params and whose content is a_content. By default, the href attribute is a relative URL recomputed at each request with Eliom_output.​HtmlText.​make_uri.

Within a Eliom application (see Eliom_output.​Eliom_appl), the generated <a> node contains an onclick attribute that is equivalent to the Eliom_client.​change_page function. If the optional parameter ~no_appl:true is given the onclick attribute won't be added and if the generated link is clicked the client side process is stopped. The ~noappl parameter has no effect outside an Eliom application.

The optional parameter ~a allows to add extra HTML attributes to the generated node.

See Eliom_output.​HtmlText.​make_uri for description of other optional parameters.

The function css_link ~uri () creates a <link> node that reference a Cascading StyleSheet (CSS).

If the CSS is generated by an Eliom service, use Eliom_output.​HtmlText.​make_uri to calculate the service URI. If the CSS is a static file, you may also use Eliom_services.​static_dir or Eliom_services.​external_service to abstract the file with a service.

The optional parameter ~a allows to add extra HTML attributes to the generated node.

val js_script : ?a:string -> uri:string -> unit -> string

The function js_script ~uri () creates a <script> node that reference a javascript file.

If the script content is generated by an Eliom service, use Eliom_output.​HtmlText.​make_uri to calculate the service URI. If it is a static file, you may also use Eliom_services.​static_dir or Eliom_services.​external_service to abstract the file with a service.

The optional parameter ~a allows to add extra HTML attributes to the generated node.

val get_form : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  ?a:string ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, 'c,
   [< Eliom_services.registrable ], 'd)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?no_appl:bool -> ('b -> string) -> string

The function post_form service formgen creates a GET <form> to service. The content of the <form> is generated by the function formgen, that takes the names of the service parameters as parameters. By default, the action attribute is a relative URL recomputed at each request with Eliom_output.​HtmlText.​make_uri.

Within a Eliom application (see Eliom_output.​Eliom_appl), the generated <form> node contains an onsubmit attribute that is equivalent to the Eliom_client.​change_page function. If the optional parameter ~no_appl:true is given the onsubmit attribute won't be added and if the <form> is submitted the client side process is stopped. The ~noappl parameter has no effect outside an Eliom application.

The optional parameter ~a allows to add extra HTML attributes to the generated node.

See Eliom_output.​HtmlText.​make_uri for description of other optional parameters.

val lwt_get_form : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  ?a:string ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, 'c,
   [< Eliom_services.registrable ], 'd)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?no_appl:bool -> ('b -> string Lwt.t) -> string Lwt.t

Same as Eliom_output.​HtmlText.​get_form but taking a cooperative function for <form> content generation.

val post_form : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  ?a:string ->
  service:('a, 'b, [< Eliom_services.post_service_kind ],
   [< Eliom_services.suff ], 'c, 'd,
   [< Eliom_services.registrable ], 'e)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?keep_get_na_params:bool ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?no_appl:bool -> ('d -> string) -> 'a -> string

The function post_form service formgen get_params creates a POST <form> to service preapplied to the GET parameters get_params. The content of the <form> is generated by the function formgen, that takes the names of the service parameters as parameters. By default, the action attribute is a relative URL recomputed at each request with Eliom_output.​HtmlText.​make_uri.

The optional parameter ~a allows to add HTML attributes to the generated node.

See Eliom_services.​post_coservice' for a description of the ~keep_get_na_params optional parameter ; see Eliom_output.​HtmlText.​get_form for ~no_appl and see Eliom_output.​HtmlText.​make_uri for other optional parameters.

val lwt_post_form : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  ?a:string ->
  service:('a, 'b, [< Eliom_services.post_service_kind ],
   [< Eliom_services.suff ], 'c, 'd,
   [< Eliom_services.registrable ], 'e)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?keep_get_na_params:bool ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?no_appl:bool -> ('d -> string Lwt.t) -> 'a -> string Lwt.t

Same as Eliom_output.​HtmlText.​post_form but taking a cooperative function for <form> content generation.

Form widgets

val int_input : 
  ?a:string ->
  input_type:string ->
  ?name:[< int Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:int -> unit -> string

Creates an <input> tag for an integer

val int32_input : 
  ?a:string ->
  input_type:string ->
  ?name:[< int32 Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:int32 -> unit -> string

Creates an <input> tag for an integer

val int64_input : 
  ?a:string ->
  input_type:string ->
  ?name:[< int64 Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:int64 -> unit -> string

Creates an <input> tag for an integer

val float_input : 
  ?a:string ->
  input_type:string ->
  ?name:[< float Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:float -> unit -> string

Creates an <input> tag for a float

val string_input : 
  ?a:string ->
  input_type:string ->
  ?name:[< string Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:string -> unit -> string

Creates an <input> tag for a string

val user_type_input : 
  ('a -> string) ->
  ?a:string ->
  input_type:string ->
  ?name:[< 'a Eliom_parameters.setoneradio ] Eliom_parameters.param_name ->
  ?value:'a -> unit -> string

Creates an <input> tag for a user type

val raw_input : 
  ?a:string ->
  input_type:string -> ?name:string -> ?value:string -> unit -> string

Creates an untyped <input> tag. You may use the name you want (for example to use with Eliom_parameters.​any).

val file_input : 
  ?a:string ->
  name:[< Eliom_pervasives.file_info Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  unit -> string

Creates an <input> tag for sending a file

val image_input : 
  ?a:string ->
  name:[< Eliom_parameters.coordinates Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  ?src:string -> unit -> string

Creates an <input type="image" name="..."> tag that sends the coordinates the user clicked on

val int_image_input : 
  ?a:string ->
  name:[< (int * Eliom_parameters.coordinates) Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:int -> ?src:string -> unit -> string

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of type int

val int32_image_input : 
  ?a:string ->
  name:[< (int32 * Eliom_parameters.coordinates)
   Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:int32 -> ?src:string -> unit -> string

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of type int32

val int64_image_input : 
  ?a:string ->
  name:[< (int64 * Eliom_parameters.coordinates)
   Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:int64 -> ?src:string -> unit -> string

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of type int64

val float_image_input : 
  ?a:string ->
  name:[< (float * Eliom_parameters.coordinates)
   Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:float -> ?src:string -> unit -> string

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of type float

val string_image_input : 
  ?a:string ->
  name:[< (string * Eliom_parameters.coordinates)
   Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:string -> ?src:string -> unit -> string

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of type string

val user_type_image_input : 
  ('a -> string) ->
  ?a:string ->
  name:[< ('a * Eliom_parameters.coordinates) Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:'a -> ?src:string -> unit -> string

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of user defined type

val raw_image_input : 
  ?a:string ->
  name:string -> value:string -> ?src:string -> unit -> string

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and an untyped value

val bool_checkbox : 
  ?a:string ->
  ?checked:bool ->
  name:[ `One of bool ] Eliom_parameters.param_name -> unit -> string

Creates a checkbox <input> tag that will have a boolean value. The service must declare a bool parameter.

val int_checkbox : 
  ?a:string ->
  ?checked:bool ->
  name:[ `Set of int ] Eliom_parameters.param_name ->
  value:int -> unit -> string

Creates a checkbox <input> tag that will have an int value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val int32_checkbox : 
  ?a:string ->
  ?checked:bool ->
  name:[ `Set of int32 ] Eliom_parameters.param_name ->
  value:int32 -> unit -> string

Creates a checkbox <input> tag that will have an int32 value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val int64_checkbox : 
  ?a:string ->
  ?checked:bool ->
  name:[ `Set of int64 ] Eliom_parameters.param_name ->
  value:int64 -> unit -> string

Creates a checkbox <input> tag that will have an int64 value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val float_checkbox : 
  ?a:string ->
  ?checked:bool ->
  name:[ `Set of float ] Eliom_parameters.param_name ->
  value:float -> unit -> string

Creates a checkbox <input> tag that will have a float value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val string_checkbox : 
  ?a:string ->
  ?checked:bool ->
  name:[ `Set of string ] Eliom_parameters.param_name ->
  value:string -> unit -> string

Creates a checkbox <input> tag that will have a string value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val user_type_checkbox : 
  ('a -> string) ->
  ?a:string ->
  ?checked:bool ->
  name:[ `Set of 'a ] Eliom_parameters.param_name ->
  value:'a -> unit -> string

Creates a checkbox <input> tag that will have a "user type" value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val raw_checkbox : 
  ?a:string ->
  ?checked:bool -> name:string -> value:string -> unit -> string

Creates a checkbox <input> tag with untyped content. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type any.

val string_radio : 
  ?a:string ->
  ?checked:bool ->
  name:[ `Radio of string ] Eliom_parameters.param_name ->
  value:string -> unit -> string

Creates a radio <input> tag with string content

val int_radio : 
  ?a:string ->
  ?checked:bool ->
  name:[ `Radio of int ] Eliom_parameters.param_name ->
  value:int -> unit -> string

Creates a radio <input> tag with int content

val int32_radio : 
  ?a:string ->
  ?checked:bool ->
  name:[ `Radio of int32 ] Eliom_parameters.param_name ->
  value:int32 -> unit -> string

Creates a radio <input> tag with int32 content

val int64_radio : 
  ?a:string ->
  ?checked:bool ->
  name:[ `Radio of int64 ] Eliom_parameters.param_name ->
  value:int64 -> unit -> string

Creates a radio <input> tag with int64 content

val float_radio : 
  ?a:string ->
  ?checked:bool ->
  name:[ `Radio of float ] Eliom_parameters.param_name ->
  value:float -> unit -> string

Creates a radio <input> tag with float content

val user_type_radio : 
  ('a -> string) ->
  ?a:string ->
  ?checked:bool ->
  name:[ `Radio of 'a ] Eliom_parameters.param_name ->
  value:'a -> unit -> string

Creates a radio <input> tag with user_type content

val raw_radio : 
  ?a:string ->
  ?checked:bool -> name:string -> value:string -> unit -> string

Creates a radio <input> tag with untyped string content (low level)

val string_button : 
  ?a:string ->
  name:[< string Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:string -> string -> string

Creates a <button> tag with string content

val int_button : 
  ?a:string ->
  name:[< int Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:int -> string -> string

Creates a <button> tag with int content

val int32_button : 
  ?a:string ->
  name:[< int32 Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:int32 -> string -> string

Creates a <button> tag with int32 content

val int64_button : 
  ?a:string ->
  name:[< int64 Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:int64 -> string -> string

Creates a <button> tag with int64 content

val float_button : 
  ?a:string ->
  name:[< float Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:float -> string -> string

Creates a <button> tag with float content

val user_type_button : 
  ('a -> string) ->
  ?a:string ->
  name:[< 'a Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:'a -> string -> string

Creates a <button> tag with user_type content

val raw_button : 
  ?a:string ->
  button_type:string -> name:string -> value:string -> string -> string

Creates a <button> tag with untyped string content

val button : ?a:string -> button_type:string -> string -> string

Creates a <button> tag with no value. No value is sent.

val textarea : 
  ?a:string ->
  name:[< string Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:string -> rows:int -> cols:int -> unit -> string

Creates a <textarea> tag

val raw_textarea : 
  ?a:string ->
  name:string -> ?value:string -> rows:int -> cols:int -> unit -> string

Creates a <textarea> tag for untyped form

type 'a soption = string * 'a * string option * bool
type 'a select_opt =  | Optgroup of 
    string * string * 'a soption
     * 'a soption list
 | Option of 'a soption

The type for <select> options and groups of options.

  • The field of type 'a in soption is the value that will be sent by the form.
  • If the pcdata_elt option is not present it is also the value displayed.
  • The string in select_opt is the label
val int_select : 
  ?a:string ->
  name:[< `One of int ] Eliom_parameters.param_name ->
  int select_opt ->
  int select_opt list -> string

Creates a <select> tag for int values.

val int32_select : 
  ?a:string ->
  name:[< `One of int32 ] Eliom_parameters.param_name ->
  int32 select_opt ->
  int32 select_opt list -> string

Creates a <select> tag for int32 values.

val int64_select : 
  ?a:string ->
  name:[< `One of int64 ] Eliom_parameters.param_name ->
  int64 select_opt ->
  int64 select_opt list -> string

Creates a <select> tag for int64 values.

val float_select : 
  ?a:string ->
  name:[< `One of float ] Eliom_parameters.param_name ->
  float select_opt ->
  float select_opt list -> string

Creates a <select> tag for float values.

val string_select : 
  ?a:string ->
  name:[< `One of string ] Eliom_parameters.param_name ->
  string select_opt ->
  string select_opt list -> string

Creates a <select> tag for string values.

val user_type_select : 
  ('a -> string) ->
  ?a:string ->
  name:[< `One of 'a ] Eliom_parameters.param_name ->
  'a select_opt ->
  'a select_opt list -> string

Creates a <select> tag for user type values.

val raw_select : 
  ?a:string ->
  name:string ->
  string select_opt ->
  string select_opt list -> string

Creates a <select> tag for any (untyped) value.

val int_multiple_select : 
  ?a:string ->
  name:[< `Set of int ] Eliom_parameters.param_name ->
  int select_opt ->
  int select_opt list -> string

Creates a <select> tag for int values.

val int32_multiple_select : 
  ?a:string ->
  name:[< `Set of int32 ] Eliom_parameters.param_name ->
  int32 select_opt ->
  int32 select_opt list -> string

Creates a <select> tag for int32 values.

val int64_multiple_select : 
  ?a:string ->
  name:[< `Set of int64 ] Eliom_parameters.param_name ->
  int64 select_opt ->
  int64 select_opt list -> string

Creates a <select> tag for int64 values.

val float_multiple_select : 
  ?a:string ->
  name:[< `Set of float ] Eliom_parameters.param_name ->
  float select_opt ->
  float select_opt list -> string

Creates a <select> tag for float values.

val string_multiple_select : 
  ?a:string ->
  name:[< `Set of string ] Eliom_parameters.param_name ->
  string select_opt ->
  string select_opt list -> string

Creates a <select> tag for string values.

val user_type_multiple_select : 
  ('a -> string) ->
  ?a:string ->
  name:[< `Set of 'a ] Eliom_parameters.param_name ->
  'a select_opt ->
  'a select_opt list -> string

Creates a <select> tag for user type values.

val raw_multiple_select : 
  ?a:string ->
  name:string ->
  string select_opt ->
  string select_opt list -> string

Creates a <select> tag for any (untyped) value.