Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • context - An object that provides component(vue) functionalities/properties

  • data - The current form data model as JSON. This way you can access the current value of all widgets of the form by using the id of the widget. Also this way you can update the value of a widget.

  • schema - The /wiki/spaces/DEV/pages/2482176001 Form Schema which is related to this form in JSON format.

  • config- The Form Config of this form as JSON document.

  • value - The current value of the widget which has fired this event.

  • fieldId- The id of the field(as defined in the Form Schema) which has fired this event and therefore caused the script to be executed.

  • pi - The PIPEFORCE object which allows you to communicate with the backend and execute pipelines and commands for example from inside JavaScript.

...

In case you have to implement more complex logic which is more than a single line, then consider to put your form script into a property in the property store and link to it like this:

...

The form events you can hook-in for are all liste here:

onbeforedatabind

This event method is called after page was loaded but before form data is set on widgets. This way you can transform and change data if required, before it gets finally bind to the the form fields.

For example in case you would like to do some extra date formats or highlight some fields depending on the initial data.

onblur

Emitted when the widget loses focus.
Also see: https://developer.mozilla.org/en-US/docs/Web/API/Element/blur_event

...