This pull request adds support for terminal42/contao-mp_forms.
One thing to note is that I have removed the label increasing count. For example, if you add 3 items and go back to this view (whether it is MP Forms page switch or a form validation error), then the fieldsets and labels look like this:
Person: Name, E-mail.
Person 1: Name 1, E-mail 1.
Person 2: Name 2, E-mail 2.
What's the problem? When you duplicate a fieldset via JS now, it will not update the legend and labels, resulting in:
Person: Name, E-mail.
Person 1: Name 1, E-mail 1.
Person 1: Name 1, E-mail 1.
Person 2: Name 2, E-mail 2.
Or
Person: Name, E-mail.
Person 1: Name 1, E-mail 1.
Person 2: Name 2, E-mail 2.
Person 2: Name 2, E-mail 2.
All depending which fieldset you duplicate. I tried to change this behavior in JS, but that would require "reindexing" all fieldsets. To do that I'd rewrite whole JS code probably, which I didn't want to do just yet.
Thus, I decided to remove the increasing labels. They were a bit inconsistent anyway, because when you duplicate fieldsets via JS the legends/labels did not change. However if you revisit the page, then the labels suddenly change to what's listed above.
This pull request adds support for terminal42/contao-mp_forms.
One thing to note is that I have removed the label increasing count. For example, if you add 3 items and go back to this view (whether it is MP Forms page switch or a form validation error), then the fieldsets and labels look like this:
What's the problem? When you duplicate a fieldset via JS now, it will not update the legend and labels, resulting in:
Or
All depending which fieldset you duplicate. I tried to change this behavior in JS, but that would require "reindexing" all fieldsets. To do that I'd rewrite whole JS code probably, which I didn't want to do just yet.
Thus, I decided to remove the increasing labels. They were a bit inconsistent anyway, because when you duplicate fieldsets via JS the legends/labels did not change. However if you revisit the page, then the labels suddenly change to what's listed above.
I am looking forward to your feedback!