Forms 2.0 renders unnecessary code and forms are submitted twice | Community
Skip to main content
Level 2
June 23, 2021
Question

Forms 2.0 renders unnecessary code and forms are submitted twice

  • June 23, 2021
  • 1 reply
  • 1491 views

Hello,

 

I have a landing page template with a form. In the end of the head I am calling the forms2 js file: js/forms2/js/forms2.min.js .

 

When I approve the template and apply it on a landing page, I get the following source(this is only part of it):

<noscript> <form class='mktoForm mktoNoJS' action='/index.php/leadCapture/save' method='post'> <div class='mktoFormRow'> <div class='mktoFormCol'> <label class="mktoLabel" for='FirstName'> First Name: </label> <input type="text" class='mktoField mktoTextField' name='FirstName' id='FirstName'> </div> </div> <div class='mktoFormRow'> <div class='mktoFormCol'> <label class="mktoLabel" for='LastName'> Last Name: </label> <input type="text" class='mktoField mktoTextField' name='LastName' id='LastName'> </div> </div> </noscript>

This whole LeadCapture part is deprecated as far as I know, but I dont have in my landing page template, so I suppose the issue comes from the forms2.min.js file. If needed, I will attach the file and send it to you. As I can see, there is this part:

formSubmitPath:"/index.php/leadCapture/save2

 

And I presume this code is causing another problem, our forms are submitted twice- they go thru the flow 2 times.

 

Could you please help me to fix this issue?

 

Thanks,

Yavor

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
June 23, 2021
You'll have to link to your page. This is almost certainly happening because of a bug in some custom JS you've added.

What you're seeing as "unnecessary" is simply the noscript version of the form. Nothing redundant there.
Level 2
June 23, 2021

Hi Sanford,

 

thanks for your reply. Here is the page https://info.softwareag.com/Connected-Manufacturing-IIoT-report.html