Skip to content

Commit

Permalink
Update contest-form.js
Browse files Browse the repository at this point in the history
review comments
  • Loading branch information
kailasnadh790 committed Dec 20, 2023
1 parent f5bc483 commit 2bce182
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cigaradvisor/blocks/contest-form/contest-form.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { readBlockConfig } from '../../scripts/aem.js';

export default async function decorate(block) {
const config = readBlockConfig(block);
const iframeWrapper = document.createElement('div');
iframeWrapper.id = 'vsscript_148868_314195';
iframeWrapper.id = config.formid;
block.replaceChildren(iframeWrapper);
const p = document.createElement('p');
function loadScript() {
const script = document.createElement('script');
script.async = true;
script.type = 'text/javascript';
script.src = 'https://app.viralsweep.com/vsa-widget-bedfd7-148868.js?sid=148868_314195';
script.src = config.formurl;
p.appendChild(script);
}
block.appendChild(p);
Expand Down

0 comments on commit 2bce182

Please sign in to comment.