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

Question

Question

Restore "Submit" command

asked on August 10, 2016

We added a button to a form:

and disabled the form "Submit" with the event.preventDefault() so the form would not continue until the information returned was evaluated:

How do I re-enable the default Laserfiche Submit?

0 0

Replies

replied on August 11, 2016

Hi Mary,

Try using this script.

$(document).ready(function(){
  var allowSubmit = false;
  $('#form1').on('submit', function(e) {
    if(!allowSubmit) {
    	e.preventDefault();
      	
      	// place validation logic here
      	//set allowSubmit to true once operation complete
      	allowSubmit = true;
    }
  });
	
});

 

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

Sign in to reply to this post.