Re: Forms 2.0 renders unnecessary code and forms are submitted twice

Yavor_Todorov
Level 3

Forms 2.0 renders unnecessary code and forms are submitted twice

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

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Forms 2.0 renders unnecessary code and forms are submitted twice

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.
Yavor_Todorov
Level 3

Re: Forms 2.0 renders unnecessary code and forms are submitted twice

Hi Sanford,

 

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