what is the correct way to dynamically create new Child Elements in a Fluid Form using JavaScript?
Problem: 1:n Relation (Parent/Child) using Extbase ObjectStorages: When the Parent Fluid Form is called it should be possible to add several childs (incl. properties of course!)
Dirty, partly working, Solution: I added some JS Code and added the required input elements dynamically. The "xxx" will be interated for each Child. The data will be correctly stored in the DB.
<input type="text" placeholder="First Name" name="tx_booking[newBooking][accompanyingperson][xxx][firstname]">
However, if an error occurres all child forms disappear and no f3-form-error will be shown. The reason for this, may be the redirect to originalRequest (initial form without child fields).
How can I handle this Problem without dirty tricks? Please give me shirt hint.