Page 1 of 1

Testing for Signature (Offline)

Posted: Tue Nov 26, 2013 4:20 am
by MarcusLancaster
Hi all.

I can provide the user which an opportunity to enter a signature, and that image control can be bound to a local database table "bytes" field for later upload to a server - but is there a way that I can "test" that a signature has been entered?

Ideally I want to only allow the user to press the "upload" button if they have signed. If there is no signature, then the upload button press will not perform the upload and will instead display a suitable pop up message.

I've tried testing that field (in the local Javascript) against "null" - but it always appears to be null regardless of whether a signature has been entered or not. I've also tried testing the ANNOTATION.IMAGE property of the control, and again that doesn't seem to work...

Does anybody have any examples of this type of logic? I'm probably missing something obvious!

Cheers.

Marcus.

Re: Testing for Signature (Offline)

Posted: Tue Nov 26, 2013 11:31 am
by tsupartono
Marcus,
If the element is not bound to any field, it is not possible (using client-side logic) at this time to check whether signature has been entered.
If the element is bound, you can check the length of the underlying (bound) field using SQL (using sqlite LENGTH() function).

Re: Testing for Signature (Offline)

Posted: Tue Nov 26, 2013 5:40 pm
by MarcusLancaster
Brilliant! Yep its bound to a field in a table, so using length() worked a treat.

Thanks for that.

Cheers.

Marcus.