Forms, best practice for from field with list of Strings/Ids


#1

I’d like to be able to start a process by using a Camunda Generated Task Form.
But one of my input fields needs to contain a list of Strings, and s.th. like a list/array datatype is not directly supported (https://docs.camunda.org/manual/7.9/user-guide/task-forms/#form-fields ) .

How would you recommend to implement this? Selecting type “String”, write a Json-Array into the form field and parse it yourself? Or is there any easier way to do this?


#2

Hello @mase,

maybe it’s not easier for the developer, but easier for the enduser: Use an embedded form to enter the data.

Here you can spread the list values to specific form fields: https://docs.camunda.org/manual/7.9/reference/embedded-forms/json-data/.

See https://github.com/camunda/camunda-bpm-examples/blob/master/usertask/task-form-embedded-json/src/main/webapp/forms/task-form.html how to build a form.

Hope this helps, Ingo