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

Question

Question

How to trigger a submit event on a public form

asked on September 1, 2015

I have a public form that has some script logic that triggers when the form is submitted (making a read-only field not read-only, so that the value gets saved properly). I have used this successfully on numerous forms, and it's sometimes successful with this one.

I have narrowed it down to this form being public and the person submitting the form not being logged in. In that case, the below 'on submit' logic fails to trigger. If I log in, then it works.

Anybody have any ideas on how to get this to fire off for public users that are not logged in?

The script looks like this (and yes, it's inside of document.ready):

       //on submit, remove read-only	
  	$('#form1').on('submit', function (event) {	
	  //make sure there are no errors, like empty required fields
	  if($('.ws-invalid').length == 0){
		  $('#q108 select').removeAttr('disabled');
		  event.submit();
	  }
	});//end submit function

 

0 0

Answer

APPROVED ANSWER
replied on September 18, 2015

A support case had been opened for this issue. After upgrading to Forms 9.2.1, the JS worked fine.

1 0

Replies

replied on January 19, 2017

This doesn't seem to be working right in 10.2. Has the validation changed?

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

Sign in to reply to this post.