Search code examples
javascriptrestorbeon

How can I call Javascript code from a button in Orbeon Forms CE?


I am using the Orbeon Forms Community Edition and I wish to create a button to call a javascript method. This method will call a web service that returns a value and this value will be used to update a field on the form. In particular, I wish to get the exchange rate for a currency on the form through an available web service. I know that web services feature is fully supported in the Professional Edition but I wish to ask you if I could implement the aforementioned scenario in the Community Edition. If so, is there available any sample that presents the implementation of a similar case?

Thank you


Solution

  • You can call a process which calls the navigate() action, which also supports the javascript: scheme.

    Then you can use the client-side JavaScript API to set a control value.