I'm working on a form at the moment, and starting to tie myself up in knots using the forms.
I started by using foreach to go through the existing data and create inputs related to it, which works great for maintaining what is there. Each field is tied back to the id of the record e.g. editor[1], editor[5], editor[27].
But I want to be able to add extra form fields, and found $mform->repeated_elements. But this wants to create everything using a sequential id which isn't what I want at all.
So, does anyone know the best way to repeat mform elements? There are 2 fields that are needed per record, which are sectionname and content.
Thanks