Select-box selected value dynamically generate textfields


#1

Hi there,

Im trying to modify properties panel in order to have dynamic fields.

At the moment i have a select box where options are retrieved from an ajax request - that is working 100% ok.

What i need now is that according to the option selected, generate the corresponding text input fields (can be 0, 1, 2 or more - is specified in the ajax request).

Is this possible? If so, how?

Thanks.


#2

Conditionally showing fields is commonly used in the properties panel. An example is Asynchronous Continuations. You can specify a function to determine if a field is hidden the same way you can specify how a fields value is get and set.


#3

I’ll look into that, thanks.

Will give feedback if that was what i needed!


#4

Probably i didn’t properly explain my use case.

I have an ajax request to populate a select box with unknown number of values, that is perfect.
That ajax request also gives me a list of needed parameters to be inserted in the bpmn definition (in the properties panel definition i wont know how many or which to enter - therefore i can’t define when to show what because i won’t know it).

For example:
Selectbox:

  • Option A (no parameters)
  • Option B (parameters: name and number)
  • Option C (parameters: postal code)

When designing the bpmn diagram, the user selects option A, therefore no inputs will appear after the selectbox. But if he selects option B, there should appear two text inputs (with label “Name(string)” and “Number(int)”).