The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Form duplication
Hi,
I have a form which I want to use as a template... It's an event registration form. It has calculated fields, HTML fields to display a validation page and email actions. All of these use FieldIDs to make calculation, display information or build email message to be sent. My form works perfectly.
Now I want to use it to generate event specific registration form. To do so I want to duplicate my "template form" and rename it with the name of my event.
My problem is that when duplicating the form, all IDs are replaced with new ID except for the ones in HTML fields.
QUESTION: Is there a way to duplicate a form and have those ID changes automatically.
Hope this is clear enough... If not I can provide more details
Thank you
November 12, 2018 at 5:59 am
No, there's not. IDs are generated by WordPress. When WordPress creates a new object, whether it is a post, page, image, form field, etc, it always uses a new ID. When you duplicate a form, WordPress will generate the new IDs.
Formidable generates the field keys. Field keys remain static for the life of the form. When you migrate a form to a new WordPress instance, the field keys remain the same even though the field ids change. When writing custom code, it's always better to use field keys instead of IDs.
However, if you duplicate a form in the same WordPress instance, the field keys will change as well. A field with key abcde will be abcde2, abcde3,... as you duplicate new forms. There's no way around this because every element has to be unique in the database.
Discussion closed.