diff --git a/demo.html b/demo.html index 9e28290..6401a75 100644 --- a/demo.html +++ b/demo.html @@ -176,7 +176,7 @@
Book a demo -

30-45 minutes.
Tailored to your frameworks and needs.
No hard sell.

+

30 minutes.
Tailored to your framework.
No hard sell.

We'll show you RTOSure mapped to the compliance frameworks your college actually operates under — not a generic walkthrough. Bring your compliance manager. Or just come yourself.

@@ -201,7 +201,7 @@
3
-
You ask the hard questionsYou can table all your questions. Pricing, data security, onboarding, TEAMS or your current SMS integration — nothing is off limits.
+
You ask the hard questionsWe leave 10 minutes at the end for your questions. Pricing, data security, onboarding, TEAMS integration — nothing is off limits.
@@ -218,7 +218,11 @@

Book your demo

-
+ +
@@ -252,8 +256,8 @@
- -

We'll confirm within one business day with a calendar link. Australian business hours.

+ +

We'll confirm within one business day with a calendar link. Australian business hours.

@@ -268,9 +272,72 @@ function loadComp(id,f){var el=document.getElementById(id);if(!el)return;fetch(f).then(function(r){return r.text();}).then(function(h){el.innerHTML=h;el.querySelectorAll('script').forEach(function(s){var n=document.createElement('script');n.textContent=s.textContent;document.head.appendChild(n);});});} loadComp('site-header','header.html'); loadComp('site-footer','footer.html'); + + var demoForm = document.getElementById('demo-booking-form'); + if (demoForm) { + var status = document.getElementById('demo-form-status'); + var submitButton = document.getElementById('demo-submit-button'); + + demoForm.addEventListener('submit', function(event) { + if (!demoForm.checkValidity()) return; + + event.preventDefault(); + + var data = new FormData(demoForm); + + if ((data.get('website') || '').toString().trim()) { + return; + } + + var payload = { + name: (data.get('name') || '').toString().trim(), + organisation: (data.get('organisation') || '').toString().trim(), + email: (data.get('email') || '').toString().trim(), + framework: (data.get('framework') || '').toString(), + size: (data.get('size') || '').toString(), + method: (data.get('method') || '').toString(), + notes: (data.get('notes') || '').toString().trim(), + source: 'rtosure-demo-page', + sourcePage: window.location.href, + submittedAt: new Date().toISOString() + }; + + if (status) status.textContent = 'Submitting your demo request...'; + if (submitButton) { + submitButton.disabled = true; + submitButton.textContent = 'Submitting...'; + } + + fetch(demoForm.action, { + method: 'POST', + mode: 'cors', + headers: { + 'Content-Type': 'application/json', + 'X-RTOSure-Form': 'book-demo-v1' + }, + body: JSON.stringify(payload) + }) + .then(function(response) { + if (!response.ok) throw new Error('Request failed'); + demoForm.reset(); + if (status) status.textContent = 'Thanks. Your demo request has been submitted. Redirecting...'; + window.location.href = 'demo-thank-you.html'; + }) + .catch(function() { + if (status) status.textContent = 'Sorry, the request could not be submitted. Please email support@rtosoftware.com.au and we will help you book the demo.'; + }) + .finally(function() { + if (submitButton) { + submitButton.disabled = false; + submitButton.textContent = 'Book My Demo'; + } + }); + }); + } + var obs=new IntersectionObserver(function(e){e.forEach(function(en){if(en.isIntersecting){en.target.style.opacity='1';en.target.style.transform='translateY(0)';}});},{threshold:.1,rootMargin:'0px 0px -40px 0px'}); document.querySelectorAll('.cap-card,.pricing-card,.team-card,.resource-card,.trust-badge,.stat-block,.faq-item').forEach(function(el){el.style.opacity='0';el.style.transform='translateY(20px)';el.style.transition='opacity .5s ease,transform .5s ease';obs.observe(el);}); })(); - \ No newline at end of file +