Tasklist form: html <select> "selected" option doesn't work

Hello !

I have a simple “select” and try to set the selected option

<select			
cam-variable-name="ORDERTEST"
cam-variable-type="String"
>
  <option value="first"> first</option>
  <option value="second" selected>second</option>
</ select>

but the “first” option appears as selected

checking it in the debugger, there is a weird thing appears (notice the undefined option tag!!):

If I remove the camunda variable declaration:
cam-variable-name=“ORDERTEST”
cam-variable-type=“String”
, the normal required behavior appears.

The camunda tasklist version is:
Powered by camunda BPM / v7.3.0

Any explanation, help or sympathy is welcome.

Thanks:
brucse

Hi brucse,

I assume that the weird behavior with the undefined option is a result of angulars magic. There is a issue currently open to fix the selection behavior for embedded forms: https://app.camunda.com/jira/browse/CAM-4289

In the meantime, you could try to get around the angular integration by managing the select field yourself: https://docs.camunda.org/manual/7.4/reference/embedded-forms/javascript/lifecycle/#submitting-additional-variables

Cheers
Sebastian

1 Like

Hello Sebastian !

Thank you for the answer. I’m gona try your suggestion to workaround it

Zoltan

1 Like