top of page

The Code

import wixData from 'wix-data';

 

$w.onReady(function () {

$w("#html1").onMessage((event) => {

let signStamp = event.data;

console.log(signStamp);

 

$w("#saveSignatureDataset").setFieldValue("signature", signStamp);

$w("#saveSignatureDataset").save()

.then(() => {

$w("#signatureStrip").collapse();

$w("#thankYouStrip").expand();

$w("#viewSigDataset").refresh();

})

.catch((err) => {

let errMsg = err;

});

 

});

 

});

 

export function signAgainButton_click(event) {

$w('#signatureStrip').expand();

$w('#thankYouStrip').collapse();

let isCollapsed = $w('#repeater1').collapsed;

if ( isCollapsed === true) {

$w('#repeater1').expand();

$w('#viewSignaturesButton').label = "Hide Signatures";

} else {

$w('#repeater1').collapse();

$w('#viewSignaturesButton').label = "View Signatures";

}

}

 

export function viewSignaturesButton_click(event) {

let isCollapsed = $w('#repeater1').collapsed;

if ( isCollapsed === true) {

$w('#repeater1').expand();

$w('#viewSignaturesButton').label = "Hide Signatures";

} else {

$w('#repeater1').collapse();

$w('#viewSignaturesButton').label = "View Signatures";

}

}

bottom of page