orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
511 stars 220 forks source link

Umbrella: Form Runner JavaScript API #1611

Open ebruchez opened 10 years ago

ebruchez commented 10 years ago

Including:

elson commented 10 years ago

Accessing the forms current XML model via JS would be handy

ebruchez commented 10 years ago

@elson This can't be enabled by default for security reasons, so we would need a per-form configuration to enable this API.

dhinus commented 10 years ago

Another useful event would be a value-check event, similar to xforms-value-changed but that would also fire when the value hasn't changed (e.g. when you blur a text input without changing the value). We're now listening to the blur DOM event but that fires before Orbeon has updated its data model.

ebruchez commented 10 years ago

@dhinus What would that event do? The server already receives a DOMFocusOut event in such cases, which cause the field to be marked as visited (except in the case of #619).

dhinus commented 10 years ago

@ebruchez I didn't know of DOMFocusOut, that might be enough.

The use case I have in mind is similar to the one in https://github.com/orbeon/orbeon-forms/issues/586, we have custom input fields where you can insert an external ID and we want to trigger an AJAX call whenever the input loses focus, even if the value hasn't changed.

ebruchez commented 10 years ago

@dhinus Ok you'll let us know if DOMFocusOut is not enough.

ebruchez commented 9 years ago

+1 from user on StackOverflow

ebruchez commented 9 years ago

For now we are planning to avoid exposing the XML to the client.

ebruchez commented 7 years ago

We have a first API in Orbeon Forms 2017.2 with #2634.

ebruchez commented 7 years ago

Is there a way for us to expose this as require('orbeon/form-runner.js') or something like this?