You are viewing limited content. For full access, please sign in.

Question

Question

Pre-validating required fields when using pagination in 10.2

asked on May 8, 2017 Show version history

Hi

I am able to pre-validate required fields when using the custom pagination code by calling a function as follows:

function IsValid()
  {
   var valid = true;
 
  $('.section1,.section2,.section3,.section4').show();
  $('.navbar').hide();
  $('.navitem').hide();
 
  $('#form1 input, #form1 textarea, #form1 select').filter(':visible').each(function() {
   
  if(!$(this)[0].checkValidity()) { valid = false; }
 
  });
    
  return valid;
  }

However, unable to make this (or similar approaches) work when using the out of the box pagination available in Forms 10.2.  

Can anyone share how this can be achieved?

Many thanks,

0 0

Replies

replied on May 9, 2017 Show version history

Forms 10.2 uses parsley for validation now so checkValidity no longer works;

use script like this:

if ($("#form1").parsley({excluded:":hidden"}).isValid()) {
    valid = true;
}

Reference: https://answers.laserfiche.com/questions/116675/Hide-Next-Button-in-Pagination-Until-Required-Fields-are-Completed

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.