Submit button when a progressive form is completed | Community
Skip to main content
August 2, 2016
Question

Submit button when a progressive form is completed

  • August 2, 2016
  • 1 reply
  • 1644 views

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.

1 reply

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);

});

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.

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.