overriding submit button

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

overriding submit button

nkvangip
Hi,
We are trying to override send button to post data to our service.The properties we are override to do this are
<property as="xs:string" name="oxf.fr.resource.*.*.en.buttons.send" value="submit" />

        <property as="xs:string" name="oxf.fr.detail.process.send.*.*" value='save then send("oxf.fr.detail.send.success") then navigate("/success") recover navigate("/failure")'/>

        <property as="xs:string" name="oxf.fr.detail.send.success.uri.*.*" value="http://localhost:8080/icc-data-0.1/slPatientforms/submit" />

But I am getting an error saying "Unable to run a two-pass submission and xf:load within a same action sequence."

Can you please help me in resolving this issue.
Please let me know if some other information is required

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: overriding submit button

Jens Thorsten Stumpf-2
Hi,

maybe I just can't find the right information.

How can I set the type of a xforms:input - i.e. a HTML input of type "text" - to any of the new textbased HTML5-Types but text, e.g. tel or email?
That seems rather important for mobile users because it changes the onscreen input keyboard to a more suitable layout.

Thanks in advance,

JT

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: overriding submit button

Alessandro  Vernet
Administrator
In reply to this post by nkvangip
Hi,

When you do a send("oxf.fr.detail.send.success"), by default it is a replace = "all": the idea is that you want to do a POST to a service that returns HTML, and want Orbeon Forms to send that HTML back to the browser. But of course, if you do that, you can't do a navigate() in the same sequence, and this is what the message you're seeing is trying to say.

So you might have wanted to do a replace = "instance", which you can do by adding the property:

<property as="xs:string" name="oxf.fr.detail.send.success.replace.*.*" value="instance"/>

Alternatively, and this is what I prefer, you can put those arguments explicitly in the send() instead of relying on separate properties, and write:

send(uri = "http://localhost:8080/icc-data-0.1/slPatientforms/submit", replace = "instance")

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: overriding submit button

nkvangip
This worked like a charm.  Thanks for your quick response and support.
Reply | Threaded
Open this post in threaded view
|

Re: overriding submit button

Alessandro  Vernet
Administrator
Excellent, I'm glad it worked, and thank you for the update!

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet