Skip to main content
August 2, 2016
Question

Submit button when a progressive form is completed

Just launched our first daisy chain series of landing pages with a progressive form after a user completes the first page.

It all works except that I cannot figure out how - when a user has all data points completed (about 7 total) to not display the submit button. I've looked and googled everywhere and am sure it must be possible - anyone have a quick fix?

Marc

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

3 replies

SanfordWhiteman
Level 10
August 2, 2016

Questions should be in Products, not Champions. Champions refers to the Champs program itself.

Answer is

MktoForms2.whenReady(function(form){

  var formEl = form.getFormElem()[0],

      interactiveFields = 'INPUT:not([type="submit"]):not([type="reset"]):not([type="hidden"]),SELECT,TEXTAREA';

     formEl.querySelector(interactiveFields) || formEl.parentNode.removeChild(formEl);

});

Translate
August 3, 2016

Thanks Sanford, apologies for mis-post. Figures my first post would be in the wrong spot. I'm now digging for how to use that code bit.

Translate
SanfordWhiteman
Level 10
August 3, 2016

Just wrap it in <script></script> tags.  Make sure it loads anywhere after the main Forms lib (forms2.min.js), since it uses the Forms API.

Translate