Hi @jamesbw
I hope you are doing well.
In that case, you will be using the Group field with repeater: https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#field-group
The Group A will be with the repeater option disabled while Group B enabled it.
Best Regards
Patrick Freitas
Hi Patrick,
Thank you for your help. Your advice has worked a treat!
I currently have a header named ‘Current Address.’ for my first form. When it repeats I would like the header to change to ‘Previous Address 1’ / ‘Previous Address 2.’ Could you tell me how I could go about this if it is possible please?
Thanks for any help!
Hi @jamesbw
This wouldn’t be “entirely” possible as there’s no automatic “numbering” of repeated fields and fields labels cannot by “dynamic”.
A “sort of” workaround could be to use repeater only for those additional (previous) addresses and use that together with conditional logic. Let me explain by example:
– let’s say that you gather address using “Address” field
– so you add a “section” field and label it as “Current address”
– below it you add the Address field – this will be your main/current address
– below it add a checkbox field with only a single option like “I want to add additionall addresses” and make it not checked by default
– below add another “Section” field and label it as “Previous addresses”
– below add a “Field Group” and set label empty
– inside that Group add another “Address” field, set repeater number etc; you may want to rename repeater buttons to e.g. “Add address” and “Remove address”
– finally, set visibility condition for those second (“Previous addresses”) section field and for the “Field Group” field (note: for the group, not individual fields inside it) and confiugre it to show those fields only if the checkbox is checked.
This isn’t exactly what you are looking for but should be relatively closed (minus “numbering”).
I create an example form for you so you could import it to your site, test and review settings to see how it is configured. You’ll find code to import the example for here
https://pastebin.com/vgraS79A
Best regards,
Adam
Hi Adam,
Thanks ever so much for your reply. Your solution has worked a treat. Thanks once again!
Hi @jamesbw
I’m glad I could help!
I’m marking this ticket as resolved then but in case you’d need any more/other assistance, please don’t hesitate to start a new one and we’ll be happy to help.
Best regards,
Adam