SOLVED

Re: Form Duplicating on Landing Page

Go to solution
SmartRent
Level 2

Form Duplicating on Landing Page

My preference center form keeps duplicating on my landing page. When I edit the form, it all looks good - the checkboxes work and the form is the correct length. When I approve the form and place it into my landing page, it duplicates the form and makes the checkboxes unusable. Any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
ArunSharma1
Level 1

Re: Form Duplicating on Landing Page

It seems you have created a master template for your preference center, which has two layouts:

 

1) two column layout - which you have set as hidden "display:none", but having the same form id 1025 called there

2) single column layout - which is displayed right now, having 1025 form called again

 

So when same form is called twice on the same page, it will load twice.

 

Best solution is to remove the form from the layout which is not enabled, means the 1st layout "two column layout"

 

Hope this solves the issue.

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Form Duplicating on Landing Page

This happens when loadForm() or newForm() is called multiple times for the same form — it will inject the form DOM inside the first found <form> tag.

 

I see multiple form tags in your markup. If you don't see them in the LP Editor nor in the template, it's possible that you have a corrupt LP with remnants of a past template version. Create a new LP and test again.

ArunSharma1
Level 1

Re: Form Duplicating on Landing Page

It seems you have created a master template for your preference center, which has two layouts:

 

1) two column layout - which you have set as hidden "display:none", but having the same form id 1025 called there

2) single column layout - which is displayed right now, having 1025 form called again

 

So when same form is called twice on the same page, it will load twice.

 

Best solution is to remove the form from the layout which is not enabled, means the 1st layout "two column layout"

 

Hope this solves the issue.

SmartRent
Level 2

Re: Form Duplicating on Landing Page

Thank you! This did solve the problem.