Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Post Closed
Pedro Gonçalves
Staff
30
Views
0
Comments
[Signature] How to use jSignature with the Offline component?
Question
JavaScript
Component
Forge
Offline
Signature (O11)
Forge asset by
Signature Team
Hi folks,
I've just tried to use jSignature component with the Offline component and faced an issue:
how to load a previously saved image back again
to the jSignature canvas in an offline-enabled page? I hope this helps anyone in the future and if possible, please comment on any further improvements/alternatives you see fit.
Here's how:
1. Using the jSignature API, in the webblock's Javascript original code, change the
export format data
to
base30
as highlighted below (
base30
is one the few formats available in the jSignature minified version allowing both export/import):
2. In your offline application code, when fetching the record using the Offline API, call the jSignature API
setData
command to replace the signature with your previously saved data, as follows:
In the example above, I'm setting up a function to schedule the signature update in 2secs. This is necessary because the jSignature code still needs to be instantiated before we perform the image load. But I believe there are certainly better ways to do this (for example event-driven?) So le's hear an alternative to this approach. Thanks!
Loading...