How to get the selected value of a selectBox


I want to get the selected Value of a selectBox.
I created it that way:


How do I get the selected value out of it?
With the value I want to decide which textboxes will follow that.

Could you explain your issue in a structured and detailed manner, so anyone has a fair chance to understand your use case?

If you are stuck with a particular problem, provide the necessary context. Phrase your post so that we can follow your line of thought, step by step.

Please revise your post; we may not be able to help you otherwise. We may also close topics of low quality to prevent spam.

Thanks :heart:

1 Like

Okay, I will try to be more precise.

I am extending the BPMN Modeler Properties Panel. I added a customisable properties provider and a new Tab to the UserTask.
If a User chooses the User Task in the Modeler, there should be two possible kinds of layouts to choose between using a selectBox.

I got it to the point where its possible to choose between template1 and template2.

If template1 gets chosen there should be created two textboxes and template2 should go with 4 textBoxes. The textBoxes are all different and should be created in the same Tab as the selectBox.

My Question: How can I get different textboxes created in the properties Panel, depending on the value that is chosen in the selectBox.

Thank you for every hint you can give me.

Thanks for clarifying your case.

Not diving into the details yet, what you’d like to achieve reads very much like element templates. You have two kinds of tasks and depending on the type of task, you provide different inputs to the user?

Or am I missing something?

Without using element templates the way to achieve this is:

  • Store the selectBox value with the selected user task
  • Render properties conditionally, i.e. if value=foo, render two inputs, else render four
  • :arrow_right: The properties panel is reactive and re-draws whenever an elements properties change. It will be able to pickup the update.

You cannot implement this without storing the value of selectBox in the properties panel right now.