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

Question

Question

Validate and show error with Pagination

asked on April 17, 2020

I have been trying to expand on this...

$(document).ready(function(){
  $("#form1").change(validate);
  validate();
  $('.cf-next-btn').click(validate);
  $('.cf-prev-btn').click(validate);
  function validate() {
    if ($("#form1").parsley({excluded:":hidden"}).isValid()) {
      $('.cf-next-btn').show();
    }
    else {
      $('.cf-next-btn').hide();
    }
  }
})

from this posthttps://answers.laserfiche.com/questions/116675/Hide-Next-Button-in-Pagination-Until-Required-Fields-are-Completed

 

What I want to be able to do is to prevent the user proceeding to the next tab and to highlight / show the 'value is required' message on each field.

I'm using forms 10.4.3

I've spent a few hours going around in circles. My JavaScripting is just not working :|

Thanks in advance.

0 0

Replies

replied on April 17, 2020 Show version history

Try this ..

 

01$(document).ready(function(){

02  $("#form1").change(function(){validate();});

04  $('.cf-next-btn').click(function(){validate();});

05  $('.cf-prev-btn').click(function(){validate();});

14});

 

06  function validate() {

07    if ($("#form1").parsley({excluded:":hidden"}).isValid()) {

08      $('.cf-next-btn').show();

09    }

10    else {

11      $('.cf-next-btn').hide();

12    }

13  }

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

Sign in to reply to this post.