cancel
Showing results for 
Search instead for 
Did you mean: 

Form support for conditional display, actions

jonnyg
Confirmed Champ
Confirmed Champ
Following this question from last year – https://forums.activiti.org/content/read-only-form

Using the Kickstart-generated forms, how do we support dynamic updates between fields?

When a property is set to a given value, can we:
  set other property values on screen?
  disable other values (I know we can hide them)

Two ideas I can think of:
  - Metadata fields to orchestrate this (requiring updates to Kickstart)
  - Injecting JavaScript in the form (probably even trickier in a SPA)

6 REPLIES 6

jbarrez
Star Contributor
Star Contributor
(moved to Enterprise forum)

Changing other form fields is currently only possible through customizing the javascript extensions. There, you can react on the formFieldValueChanged callback and change other fields.

jonnyg
Confirmed Champ
Confirmed Champ
Thanks – which Javascript extensions? Where would this be done? Would this code apply to only the desired form?
Is this something on the radar to be included in the form structure, to be modifiable within the Kickstart editor?

jonnyg
Confirmed Champ
Confirmed Champ
Found it – these are handled universally in workflow/extensions/render-form-extensions.js – loaded for every form.
So we'd need some hefty conditional logic to check we're in the specific form. What are the form/field object definitions?


jonnyg
Confirmed Champ
Confirmed Champ
My thinking on this – I expect the intermediate step is to represent the field interactions in a JSON file, and have render-form-extensions.js read & process that. Ultimately, the Kickstart Editor could maintain the UI to manage that.

trademak
Star Contributor
Star Contributor
Hi,

In the upcoming 1.4 release of the Activiti BPM Suite we support adding custom javascript event handlers on a form level in the Kickstart editor.

Best regards,

jonnyg
Confirmed Champ
Confirmed Champ
Thanks - we will probably discuss more of the details with you.