Re: Submit button when a progressive form is completed

Anonymous
Not applicable

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

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Submit button when a progressive form is completed

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

});

Anonymous
Not applicable

Re: Submit button when a progressive form is completed

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 - Community Moderator

Re: Submit button when a progressive form is completed

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.