In our most recent implementation, our team was using CHT 4.1.0 instead of the usual CHT 3.17.1. Here, our form designers used a loop to generate multiple file upload fields to get images based on the number provided by the user.
Here is a comprehensive look at the whole process:
Step 1: Enter the number of images you want to upload in the
image_count input field
Step 2: Use
image_count value to generate
image upload fields, i.e. if input to
image_count is 3, three
image upload fields are rendered.
Step 3: Upload files to all the rendered
image upload fields
Step 4: Press
Submit to upload form
The form fails to submit with the message Error Saving Report. And in the console, the following error can be seen. The upload fields are rendered as needed but the form does not submit at all.
Note: The issue only occurs when we add more than one images. If you enter 1 in the
image_countfield and upload only 1 image, it generates no errors and the form submits as expected. It only happens for 2 or more
Please let me know if you need further context.