Controlling the form and 'submit' button IDs

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

Controlling the form and 'submit' button IDs

Karthi
Hi,

Is it possible to generate same DOM id for the HTML component (Esp, the embedded Orbeon form's id) rendered on the browser ?

Also generate the same id for the 'Submit' button added in the form from 'properties-local-prod.xml' file?

I am designing the form using form builder (Orbeon 4.9) and using Embedding API for integration.

This is required to hack the submit button added by Orbeon, to perform some of the APP specific logic and then submit to Orbeon form.

Since, the Orbeon server call interception is required to open a popup which requires user interaction, I am not able to define this as another server callback.

Any other way of doing should also be fine to achieve this.

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the form and 'submit' button IDs

Alessandro  Vernet
Administrator
Hi Karthi,

Could you tell us more specifically what you'd like to see happen on submit? What code "on your side" needs to be called, is it on the client or the server, and what information does that code need to receive?

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

Re: Controlling the form and 'submit' button IDs

Karthi
Hi Alessandro Vernet,

When clicking on Orbeon submit button, I need to open a popup (this popup is an existing application popup) on the same page where the Orbeon form is embedded.

The popup HTML (which is more generic to all APP pages including) is inserted using 'Apache Tiles View' along with some other application specific HTML mark-ups.

Page flow is as below,
1) APP: Display Orbeon form embedded.
2) APP: User clicks on Submit button -- this button is Orbeon action button to perform form validation.
3) Orbeon: Validate submitted Orbeon Form
4) Orbeon: On successful validation -- Open a popup in front end (yes it is client side and specific to APP)
5) APP-Popup: User provides more details in Popup and click a button in Popup.
6) APP: Save details provided in popup and close the popup then
7) APP: Submit Orbeon form.

Please let me know if you need more details.

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the form and 'submit' button IDs

Karthi
Hi,

Could someone help me with this request please?

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the form and 'submit' button IDs

Alessandro  Vernet
Administrator
Hi Karthi,

Sorry, I somehow missed your other message from a few days ago.

When you click on a button at the bottom of a form you created with Form Builder, a "process" is being run. It is in this process that you will implement steps 3 and 4. Step 3 (validating the data before proceeding), is pretty standard. For step 4, you will need to use the navigate action with something as follows: navigate(uri = "javascript:yourFunctionOpeningPopup()"). You can find more about buttons and processes on:

http://doc.orbeon.com/form-runner/advanced/buttons-and-processes.html

For step 7, you will need to have another process. The simplest way to do this is to have a button that runs this process, hide this button with CSS, and in your own pop-up dialogue code simulate the user clicking on the button.

Would something along those lines makes sense in your case?

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

Re: Controlling the form and 'submit' button IDs

Karthi

Thanks Alessandro Vernet.

I have already used 'nagivate("javascript:popu()")' function in process configuration, but not tried hiding the button using CSS. Will let you know if that worked for me.

Thanks,
Reply | Threaded
Open this post in threaded view
|

Re: Controlling the form and 'submit' button IDs

Alessandro  Vernet
Administrator
Karthi, sounds good, you'll let us know how it goes.

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