Ben
Ben

Reputation: 1599

Submit Orbeon hidden form field data

I use the send-button (formally workflow-send) to submit Orbeon form data as XML to a servlet. My send-configuration looks like this:

    <property
  as="xs:string"
  name="oxf.fr.detail.process.send.*.*"
  value='validate-all
         then send(
         uri      = "http://10.120.40.24:8080/formhandler/",
         replace  = "none",
         method   = "post",
         content  = "xml"
         )
         then navigate("success-page")
         recover navigate("error-page")'/>

I use hidden fields to pass some parameters to the form, e.g. some ids the user should not see. Therefore, I use a hidden input field (visibility = false()) and xxf:get-request-parameter('task_id') to get the parameter from the url.

When I submit the form, the data from the hidden field gets not submitted (it is not included in the generated XML). I think this is a very common use case.

Therefore my question, how can I configure that hidden field data also gets submitted using the send-button?

Thanks and best regards Ben

Upvotes: 1

Views: 640

Answers (1)

Ben
Ben

Reputation: 1599

I solved it with the prune property with setting prune=false:

<property
  as="xs:string"
  name="oxf.fr.detail.process.send.*.*"
  value='validate-all
         then send(
         uri      = "http://10.120.40.24:8080/formhandler/",
         replace  = "none",
         prune    = "false",
         method   = "post",
         content  = "xml"
         )
         then navigate("success-page")
         recover navigate("error page")'/>  

Upvotes: 2

Related Questions