Functor Eliommkforms.MakeForms


module MakeForms: 
functor (Pages : FORMCREATE) -> ELIOMFORMSIG with type form_content_elt = Pages.form_content_elt and type form_content_elt_list = Pages.form_content_elt_list and type form_elt = Pages.form_elt and type a_content_elt = Pages.a_content_elt and type a_content_elt_list = Pages.a_content_elt_list and type a_elt = Pages.a_elt and type a_elt_list = Pages.a_elt_list and type div_content_elt = Pages.div_content_elt and type div_content_elt_list = Pages.div_content_elt_list and type button_elt = Pages.button_elt and type button_content_elt = Pages.button_content_elt and type button_content_elt_list = Pages.button_content_elt_list and type uri = Pages.uri and type link_elt = Pages.link_elt and type script_elt = Pages.script_elt and type textarea_elt = Pages.textarea_elt and type select_elt = Pages.select_elt and type input_elt = Pages.input_elt and type pcdata_elt = Pages.pcdata_elt and type a_attrib_t = Pages.a_attrib_t and type form_attrib_t = Pages.form_attrib_t and type input_attrib_t = Pages.input_attrib_t and type textarea_attrib_t = Pages.textarea_attrib_t and type select_attrib_t = Pages.select_attrib_t and type link_attrib_t = Pages.link_attrib_t and type script_attrib_t = Pages.script_attrib_t and type optgroup_attrib_t = Pages.optgroup_attrib_t and type option_attrib_t = Pages.option_attrib_t and type button_attrib_t = Pages.button_attrib_t and type input_type_t = Pages.input_type_t and type button_type_t = Pages.button_type_t
Parameters:
Pages : FORMCREATE

type form_content_elt 
type form_content_elt_list 
type form_elt 
type a_content_elt 
type a_content_elt_list 
type a_elt 
type a_elt_list 
type div_content_elt 
type div_content_elt_list 
type uri 
type link_elt 
type script_elt 
type textarea_elt 
type input_elt 
type pcdata_elt 
type select_elt 
type select_content_elt 
type select_content_elt_list 
type button_elt 
type button_content_elt 
type button_content_elt_list 
type a_attrib_t 
type form_attrib_t 
type input_attrib_t 
type textarea_attrib_t 
type select_attrib_t 
type link_attrib_t 
type script_attrib_t 
type optgroup_attrib_t 
type option_attrib_t 
type button_attrib_t 
type input_type_t 
type button_type_t 

Links and forms


val make_string_uri : service:('a, unit, [< Eliomservices.get_service_kind ],
[< Eliomservices.suff ], 'b, unit, [< Eliomservices.registrable ])
Eliomservices.service ->
sp:Eliomsessions.server_params -> ?fragment:string -> 'a -> string
Creates the string corresponding to the URL of a service applyed to its GET parameters.
val make_uri : service:('a, unit, [< Eliomservices.get_service_kind ],
[< Eliomservices.suff ], 'b, unit, [< Eliomservices.registrable ])
Eliomservices.service ->
sp:Eliomsessions.server_params ->
?fragment:string -> 'a -> uri
Create the text of the service. Like the a function, it may take extra parameters.
val a : ?a:a_attrib_t ->
service:('a, unit, [< Eliomservices.get_service_kind ],
[< Eliomservices.suff ], 'b, 'c, [< Eliomservices.registrable ])
Eliomservices.service ->
sp:Eliomsessions.server_params ->
?fragment:string ->
a_content_elt_list ->
'a -> a_elt
a service sp cont () creates a link to service. The text of the link is cont. For example cont may be something like [pcdata "click here"].

The last parameter is for GET parameters. For example a service sp cont (42,"hello")

The ~a optional parameter is used for extra attributes.

The ~fragment optional parameter is used for the "fragment" part of the URL, that is, the part after character "#".

val css_link : ?a:link_attrib_t ->
uri:uri ->
unit -> link_elt
Creates a <link> tag for a Cascading StyleSheet (CSS).
val js_script : ?a:script_attrib_t ->
uri:uri ->
unit -> script_elt
Creates a <script> tag to add a javascript file
val get_form : ?a:form_attrib_t ->
service:('a, unit, [< Eliomservices.get_service_kind ],
[< Eliomservices.suff ], 'b, 'c, [< Eliomservices.registrable ])
Eliomservices.service ->
sp:Eliomsessions.server_params ->
?fragment:string ->
('b -> form_content_elt_list) ->
form_elt
get_form service sp 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.
val post_form : ?a:form_attrib_t ->
service:('a, 'b, [< Eliomservices.post_service_kind ],
[< Eliomservices.suff ], 'c, 'd, [< Eliomservices.registrable ])
Eliomservices.service ->
sp:Eliomsessions.server_params ->
?fragment:string ->
('d -> form_content_elt_list) ->
'a -> form_elt
post_form service sp formgen creates a POST form to service. The last parameter is for GET parameters (as in the function a).

Form widgets


val int_input : ?a:input_attrib_t ->
input_type:input_type_t ->
?name:[< int Eliomparameters.setoneopt ] Eliomparameters.param_name ->
?value:int -> unit -> input_elt
Creates an <input> tag for an integer
val float_input : ?a:input_attrib_t ->
input_type:input_type_t ->
?name:[< float Eliomparameters.setoneopt ] Eliomparameters.param_name ->
?value:float -> unit -> input_elt
Creates an <input> tag for a float
val string_input : ?a:input_attrib_t ->
input_type:input_type_t ->
?name:[< string Eliomparameters.setoneopt ] Eliomparameters.param_name ->
?value:string -> unit -> input_elt
Creates an <input> tag for a string
val user_type_input : ?a:input_attrib_t ->
input_type:input_type_t ->
?name:[< 'a Eliomparameters.setoneopt ] Eliomparameters.param_name ->
?value:'a -> ('a -> string) -> input_elt
Creates an <input> tag for a user type
val raw_input : ?a:input_attrib_t ->
input_type:input_type_t ->
?name:string -> ?value:string -> unit -> input_elt
Creates an untyped <input> tag. You may use the name you want (for example to use with Eliomparameters.any).
val file_input : ?a:input_attrib_t ->
name:[< Extensions.file_info Eliomparameters.setoneopt ]
Eliomparameters.param_name ->
unit -> input_elt
Creates an <input> tag for sending a file
val image_input : ?a:input_attrib_t ->
name:[< Eliomparameters.coordinates Eliomparameters.oneopt ]
Eliomparameters.param_name ->
?src:uri ->
unit -> input_elt
Creates an <input type="image" name="..."> tag that sends the coordinates the user clicked on
val int_image_input : ?a:input_attrib_t ->
name:[< (int * Eliomparameters.coordinates) Eliomparameters.oneopt ]
Eliomparameters.param_name ->
value:int ->
?src:uri ->
unit -> input_elt
Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of type int
val float_image_input : ?a:input_attrib_t ->
name:[< (float * Eliomparameters.coordinates) Eliomparameters.oneopt ]
Eliomparameters.param_name ->
value:float ->
?src:uri ->
unit -> input_elt
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:input_attrib_t ->
name:[< (string * Eliomparameters.coordinates) Eliomparameters.oneopt ]
Eliomparameters.param_name ->
value:string ->
?src:uri ->
unit -> input_elt
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:input_attrib_t ->
name:[< ('a * Eliomparameters.coordinates) Eliomparameters.oneopt ]
Eliomparameters.param_name ->
value:'a ->
?src:uri ->
('a -> string) -> input_elt
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:input_attrib_t ->
name:string ->
value:string ->
?src:uri ->
unit -> input_elt
Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and an untyped value
val bool_checkbox : ?a:input_attrib_t ->
?checked:bool ->
name:[ `One of bool ] Eliomparameters.param_name ->
unit -> input_elt
Creates a checkbox <input> tag that will have a boolean value. The service must declare a bool parameter.
val int_checkbox : ?a:input_attrib_t ->
?checked:bool ->
name:[ `Set of int ] Eliomparameters.param_name ->
value:int -> unit -> input_elt
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 float_checkbox : ?a:input_attrib_t ->
?checked:bool ->
name:[ `Set of float ] Eliomparameters.param_name ->
value:float -> unit -> input_elt
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:input_attrib_t ->
?checked:bool ->
name:[ `Set of string ] Eliomparameters.param_name ->
value:string -> unit -> input_elt
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:input_attrib_t ->
?checked:bool ->
name:[ `Set of 'a ] Eliomparameters.param_name ->
value:'a -> ('a -> string) -> input_elt
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:input_attrib_t ->
?checked:bool ->
name:string -> value:string -> unit -> input_elt
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:input_attrib_t ->
?checked:bool ->
name:[ `Opt of string ] Eliomparameters.param_name ->
value:string -> unit -> input_elt
Creates a radio <input> tag with string content
val int_radio : ?a:input_attrib_t ->
?checked:bool ->
name:[ `Opt of int ] Eliomparameters.param_name ->
value:int -> unit -> input_elt
Creates a radio <input> tag with int content
val float_radio : ?a:input_attrib_t ->
?checked:bool ->
name:[ `Opt of float ] Eliomparameters.param_name ->
value:float -> unit -> input_elt
Creates a radio <input> tag with float content
val user_type_radio : ?a:input_attrib_t ->
?checked:bool ->
name:[ `Opt of 'a ] Eliomparameters.param_name ->
value:'a -> ('a -> string) -> input_elt
Creates a radio <input> tag with user_type content
val raw_radio : ?a:input_attrib_t ->
?checked:bool ->
name:string -> value:string -> unit -> input_elt
Creates a radio <input> tag with untyped string content (low level)
val string_button : ?a:button_attrib_t ->
name:[< string Eliomparameters.setone ] Eliomparameters.param_name ->
value:string ->
button_content_elt_list ->
button_elt
Creates a <button> tag with string content
val int_button : ?a:button_attrib_t ->
name:[< int Eliomparameters.setone ] Eliomparameters.param_name ->
value:int ->
button_content_elt_list ->
button_elt
Creates a <button> tag with int content
val float_button : ?a:button_attrib_t ->
name:[< float Eliomparameters.setone ] Eliomparameters.param_name ->
value:float ->
button_content_elt_list ->
button_elt
Creates a <button> tag with float content
val user_type_button : ?a:button_attrib_t ->
name:[< 'a Eliomparameters.setone ] Eliomparameters.param_name ->
value:'a ->
('a -> string) ->
button_content_elt_list ->
button_elt
Creates a <button> tag with user_type content
val raw_button : ?a:button_attrib_t ->
button_type:button_type_t ->
name:string ->
value:string ->
button_content_elt_list ->
button_elt
Creates a <button> tag with untyped string content
val button : ?a:button_attrib_t ->
button_type:button_type_t ->
button_content_elt_list ->
button_elt
Creates a <button> tag with no value. No value is sent.
val textarea : ?a:textarea_attrib_t ->
name:[< string Eliomparameters.setoneopt ] Eliomparameters.param_name ->
?value:pcdata_elt ->
rows:int -> cols:int -> unit -> textarea_elt
Creates a <textarea> tag
val raw_textarea : ?a:textarea_attrib_t ->
name:string ->
?value:pcdata_elt ->
rows:int -> cols:int -> unit -> textarea_elt
Creates a <textarea> tag for untyped form
type 'a soption = option_attrib_t * 'a *
pcdata_elt option * bool

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

The type for <select> options and groups of options.
val raw_select : ?a:select_attrib_t ->
name:string ->
string select_opt ->
string select_opt list ->
select_elt
Creates a <select> tag for any (untyped) value.
val int_select : ?a:select_attrib_t ->
name:[< `One of int ] Eliomparameters.param_name ->
int select_opt ->
int select_opt list ->
select_elt
Creates a <select> tag for int values.
val float_select : ?a:select_attrib_t ->
name:[< `One of float ] Eliomparameters.param_name ->
float select_opt ->
float select_opt list ->
select_elt
Creates a <select> tag for float values.
val string_select : ?a:select_attrib_t ->
name:[< `One of string ] Eliomparameters.param_name ->
string select_opt ->
string select_opt list ->
select_elt
Creates a <select> tag for string values.
val user_type_select : ?a:select_attrib_t ->
name:[< `One of 'a ] Eliomparameters.param_name ->
'a select_opt ->
'a select_opt list ->
('a -> string) -> select_elt
Creates a <select> tag for user type values.
val raw_multiple_select : ?a:select_attrib_t ->
name:string ->
string select_opt ->
string select_opt list ->
select_elt
Creates a <select> tag for any (untyped) value.
val int_multiple_select : ?a:select_attrib_t ->
name:[< `Set of int ] Eliomparameters.param_name ->
int select_opt ->
int select_opt list ->
select_elt
Creates a <select> tag for int values.
val float_multiple_select : ?a:select_attrib_t ->
name:[< `Set of float ] Eliomparameters.param_name ->
float select_opt ->
float select_opt list ->
select_elt
Creates a <select> tag for float values.
val string_multiple_select : ?a:select_attrib_t ->
name:[< `Set of string ] Eliomparameters.param_name ->
string select_opt ->
string select_opt list ->
select_elt
Creates a <select> tag for string values.
val user_type_multiple_select : ?a:select_attrib_t ->
name:[< `Set of 'a ] Eliomparameters.param_name ->
'a select_opt ->
'a select_opt list ->
('a -> string) -> select_elt
Creates a <select> tag for user type values.