Execute various custom actions when submit Form Builder.

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

Execute various custom actions when submit Form Builder.

aitor
Hello,

Are there any way to execute various custom actions when you submit a form in the Form Builder? The actions to execute for example can be: 1) submit an email to a person that the mail is in one input box in the form. 2) And send another different mail to other persons. 3) And in the same submit buttom save the data in the database.
I mean when the user click the submit buttom, submit 2 mails and record the form in the database. Could anyone give me an example of how to do it. Do I have to do it with various .xpl files that perform the actions, and I call them from the Form Builder? If this is the way that it can be done, what is the code that I have to write to call this .xpl from Form Builder? Could anyone write me a little example?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Execute various custom actions when submit Form Builder.

Erik Bruchez
Administrator
Form Runner has a built-in email sending capability, which allows you to do #1:

* enable email sending upon workflow-send [1]
* mark the field as Email Recipient in the control properties
* you can also specify other email recipients in the properties

The workflow-send button also saves the data

The only thing that seems missing is sending a different email to different recipients.

Beyond that, the oxf.fr.detail.send.success.uri  allows you to specify a URL to navigate to after saving is successful. This also POSTs the XML document to that URL. So if that URL implements an email sending service, the sky is the limit.

So the steps would be:

* configure the workflow-send button properties
* implement the service

You can implement the service directly within Orbeon Forms with XPL, or you can provide your own servlet, or you can implement it in another system, since the interface is XML over HTTP and so is very flexible.

-Erik

[1] http://goo.gl/yW7Zx

On Mon, Mar 21, 2011 at 12:12 AM, aitor <[hidden email]> wrote:
Hello,

Are there any way to execute various custom actions when you submit a form
in the Form Builder? The actions to execute for example can be: 1) submit an
email to a person that the mail is in one input box in the form. 2) And send
another different mail to other persons. 3) And in the same submit buttom
save the data in the database.
I mean when the user click the submit buttom, submit 2 mails and record the
form in the database. Could anyone give me an example of how to do it. Do I
have to do it with various .xpl files that perform the actions, and I call
them from the Form Builder? If this is the way that it can be done, what is
the code that I have to write to call this .xpl from Form Builder? Could
anyone write me a little example?

Thanks

--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Execute-various-custom-actions-when-submit-Form-Builder-tp3392783p3392783.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws