Created
December 30, 2022 04:20
-
-
Save jeznag/df33ec8f60ed459c6709e223c3a5c884 to your computer and use it in GitHub Desktop.
Widget to embed Zoho Creator form inside Zoho CRM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<h2>Zoho Creator Integration</h2> | |
<iframe id="creator-iframe" width="100%" height="800px"></iframe> | |
<script src="https://live.zwidgets.com/js-sdk/1.1/ZohoEmbededAppSDK.min.js"></script> | |
<script> | |
function initializeWidget() { | |
/* | |
* Subscribe to the EmbeddedApp onPageLoad event before initializing the widget | |
*/ | |
ZOHO.embeddedApp.on("PageLoad", function (data) { | |
/* | |
* Verify if EntityInformation is Passed | |
*/ | |
if (data && data.Entity) { | |
document.querySelector('#creator-iframe').setAttribute('src', `https://creatorapp.zohopublic.com/jeremy.nagel/get-data-from-crm/form-embed/Order_Form/YOUR_EMBED_CODE_HERE?Lead_ID=${data.EntityId}`); | |
} | |
}) | |
/* | |
* initialize the widget. | |
*/ | |
ZOHO.embeddedApp.init(); | |
} | |
initializeWidget(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment