• Resolved kcc24

    (@kcc24)


    For our project it is necessary for the user to be able to “save” the form without an internet connection so that he can restore the form once the submit failed (because of missing internet connection or other reasons).

    We thought about 2 ways to solve this:
    1. We add a “Save” button to the default “Clear” button so we can store the png of the signature before we hit “Submit”.
    2. For other fields in our form we simply use the Autosaver Addon which saves any change instantly in local storage. Unfortunately signatures don’t work with this Addon, but it would be great.

    What do you think would be a better approach and can you help with the code?
    Thanks in advance!

    KCC24

    https://wordpress.org/plugins/contact-form-7-signature-addon/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author tameroski

    (@tameroski)

    Hi,

    Theoretically, my plugin should work with CF7 Autosaver. I’ll have a look at this as soon as i have the time to.

    Option 1 is also possible by using the JS signature API i’m using in the plugin. Something like this :

    var canvas = document.querySelector("THE_CANVAS_ID");
    var signaturePad = new SignaturePad(canvas);
    
    // Get value on save :
    var value = signaturePad.toDataURL();
    
    // Set value back when network is on :
    signaturePad.fromDataURL(value);
    Plugin Author tameroski

    (@tameroski)

    Hello,

    A little update on that issue : it’s a bit more complicated than i thought. Mostly because i figured out there is 2 problems in one.

    I have a fix for one of them, but still have to adress with the second one.

    I’ll have more time to have a look at all this during xmas holidays. I’ll keep you in touch.

    Thread Starter kcc24

    (@kcc24)

    Hello,

    we already managed to locally store the base64 image with your help, thanks a lot!
    Nevertheless it’ll be much prettier if it also worked in CF7 Autosaver. Thanks again for your effort.

    KCC24

    Plugin Author tameroski

    (@tameroski)

    Hey

    I implemented CF7 Autosaver compatibility. Should be OK now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Save signature locally / Autosaver Addon’ is closed to new replies.