I’m using Eliom 6.6 and I have a post service which takes two lists of integers.
let my_post_service =
Eliom_service.create
~path:Eliom_service.No_path
~meth:(
Eliom_service.Post (
Eliom_parameter.unit,
list "group_1_ids" (int "id_1") **
list "group_2_ids" (int "id_2")
)
) ()
I now want to build a form for this service. The ocsigen website says that Eliom_parameter.listnames should be used to build the form.
“To create the form, an iterator of type Eliom_parameter.listnames is given to generate the name for each value.”
I know how to build a POST form with simple Eliom_parameter types, but I’m not sure how to use listnames to build a form for my POST service with two lists.
Are there any examples on how to do this? I’m honestly a little confused by the type signature for listnames, and I could not find any examples online.
type 'an listnames = {
it: 'el 'a. ('an -> 'el -> 'a -> 'a) -> 'el list -> 'a -> 'a;}
Thanks,
Thomas