Connect with us

const FormServiceURL = ‘https://api.prd.xplorcs.com/forms-v2/forms’; const formUuid = ‘9df038f2-3673-4757-b940-437c31747f8f’; const formElement = document.forms[formUuid]; const formContainer = new XplFormContainer(FormServiceURL); const loadRecaptcha = (formConfig) => { const { template } = formConfig; const key = template.use_recaptcha ? template.recaptcha_key : null; if (key) XplFormAPI.loadRecaptchaScript(key); }; formContainer.load(formUuid).then(loadRecaptcha); window.onXplFormLocationChange = (selectElement) => formContainer.load(selectElement.value); window.onXplFormSubmit = async (event) => { event.preventDefault(); event.stopPropagation(); const form = new XplFormAPI( FormServiceURL, event.target, formContainer ); const recaptchaKey = form.getRecaptchaKey(); if (recaptchaKey) window.grecaptcha.ready(() => window.grecaptcha .execute(recaptchaKey, { action: ‘submit’ }) .then((recaptchaResponse) => form.submit(recaptchaResponse)) ); else form.submit(); };
.center-container { max-width: 720px; margin: 0 auto; }