Page 1 of 1

ink sketch validation

Posted: 22 Jun 2016
by Gerald Marxer
Is there a possibility to verify that the user has signed on a ink sketch field by javascript?

I want to verify before coloseing the form that the user has put a signature in the ink field.

regards

gerald

Re: ink sketch validation

Posted: 22 Jun 2016
by Dmitry Kozlov
Hi,

Use the code below:

Code: Select all

fd.onsubmit(function() {
	if (!$('#fd_signature-0 > input').val()) {
		alert('Please, sign the form.');
		return false;
	}
	
	return true;
});
If you have multiple Ink sketch controls in the form, set the appropriate index here:

fd_signature-0 (fd_signature-1, fd_signature-2, fd_signature-3...)