AnsweredAssumed Answered

Need Complex Form Data Suggestions

Question asked by ms1 on May 20, 2015
Latest reply on May 28, 2015 by jbarrez
Hello All,

I have a situation where I need to store 5 pieces of data for between 10-20 items. (So, 50 - 100 inputs in the the page.) For example, we want to upload 10-20 files and also data associated with those files. When the task is created, I will know how many files, but I am not sure how to best do this.

I have thought up several ideas and here are the two I think are best.
1) Use a custom form type. That sounds good, but we use external form rendering … so in my page, the custom type is just a string, so it will have to be parsed, values set in the inputs and then re-pack the strings on submit all via jQuery. Not really what I want to do, but it is a possibility. (Yes, I have successfully added my own form type and the values are visible in the page.)

2) Create 100 variables in the task and just use what is needed. (I am thinking that maybe I could add a create TaskListener and create the variables there instead of adding them all to the diagram.) This has the advantage that our standard form binding will work and I don't need to manipulate the form/submit with jQuery.

We are using Spring MVC with Thymeleaf to render pages.

What have others done in this situation?

TIA!

Outcomes