Created
September 23, 2025 14:24
-
-
Save go6media/1e45393debec0288d27f311605e98c3a to your computer and use it in GitHub Desktop.
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
| <script> | |
| console.log('[Qualified API call Debug] EN Script loaded'); | |
| window.addEventListener('load', function () { | |
| if (typeof qualified === 'function') { | |
| console.log('Qualified is initialized and ready.'); | |
| } else { | |
| console.warn('Qualified is NOT ready yet.'); | |
| } | |
| window.addEventListener('submit', function (e) { | |
| console.log('[Qualified Debug] Submit event detected'); | |
| if (e.target.matches('form')) { | |
| console.log('[Qualified Debug] Form matched'); | |
| var formData = new FormData(e.target); | |
| if (typeof qualified === 'function') { | |
| qualified('saveFormData', { | |
| first_name: formData.get('0-1/firstname'), | |
| last_name: formData.get('0-1/lastname'), | |
| email: formData.get('0-1/email'), | |
| phone_number: formData.get('0-1/phone'), | |
| country: formData.get('0-1/country'), | |
| stateprovince: | |
| formData.get('0-1/state') || | |
| formData.get('0-1/canada_province__dependent_'), | |
| title: formData.get('0-1/role_title_description'), | |
| company: formData.get('0-1/company'), | |
| total_number_of_rooms: formData.get('0-1/total_number_of_rooms__c'), | |
| property_management_system: formData.get('0-1/propertymanagementsystem__c') | |
| }); | |
| qualified('emitFormFill', 'custom'); | |
| console.log('[Qualified Debug] Form data sent to Qualified'); | |
| setTimeout(function () { | |
| qualified('showFormExperience', 'experience-1749216696627'); | |
| console.log('[Qualified Debug] showFormExperience 1749216696627 triggered'); | |
| }, 1500); | |
| } else { | |
| console.warn('[Qualified Debug] qualified() is NOT available'); | |
| } | |
| } else { | |
| console.warn('[Qualified Debug] Submitted element did NOT match "form" selector'); | |
| } | |
| }); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment