{"id":2,"date":"2026-02-20T09:18:13","date_gmt":"2026-02-20T09:18:13","guid":{"rendered":"https:\/\/creativity.com.au\/?page_id=2"},"modified":"2026-03-06T01:53:27","modified_gmt":"2026-03-06T01:53:27","slug":"sample-page","status":"publish","type":"page","link":"https:\/\/creativity.com.au\/index.php\/sample-page\/","title":{"rendered":"Sample Page"},"content":{"rendered":"\t\t<div class=\"scrm-form-wrap\" id=\"scrm-enquiry-form-wrap\">\n\t\t\t\t\t\t\t<h2 class=\"scrm-form-title\">Send Us an Enquiry<\/h2>\n\t\t\t\n\t\t\t<div id=\"scrm-form-notice\" style=\"display:none;\" role=\"alert\"><\/div>\n\n\t\t\t<div id=\"scrm-form-fields\">\n\t\t\t\t<div class=\"scrm-form-row scrm-form-row--half\">\n\t\t\t\t\t<div class=\"scrm-field\">\n\t\t\t\t\t\t<label for=\"scrm_first_name\">First name <span aria-hidden=\"true\">*<\/span><\/label>\n\t\t\t\t\t\t<input type=\"text\" id=\"scrm_first_name\" name=\"first_name\" required autocomplete=\"given-name\">\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"scrm-field\">\n\t\t\t\t\t\t<label for=\"scrm_last_name\">Last name <span aria-hidden=\"true\">*<\/span><\/label>\n\t\t\t\t\t\t<input type=\"text\" id=\"scrm_last_name\" name=\"last_name\" required autocomplete=\"family-name\">\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"scrm-form-row scrm-form-row--half\">\n\t\t\t\t\t<div class=\"scrm-field\">\n\t\t\t\t\t\t<label for=\"scrm_email\">Email <span aria-hidden=\"true\">*<\/span><\/label>\n\t\t\t\t\t\t<input type=\"email\" id=\"scrm_email\" name=\"email\" required autocomplete=\"email\">\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"scrm-field\">\n\t\t\t\t\t\t<label for=\"scrm_phone\">Phone<\/label>\n\t\t\t\t\t\t<input type=\"tel\" id=\"scrm_phone\" name=\"phone\" autocomplete=\"tel\">\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"scrm-form-row\">\n\t\t\t\t\t<div class=\"scrm-field\">\n\t\t\t\t\t\t<label for=\"scrm_company\">Company \/ Organisation<\/label>\n\t\t\t\t\t\t<input type=\"text\" id=\"scrm_company\" name=\"company\" autocomplete=\"organization\">\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"scrm-form-row scrm-form-row--half\">\n\t\t\t\t\t<div class=\"scrm-field\">\n\t\t\t\t\t\t<label for=\"scrm_training_type\">Training type<\/label>\n\t\t\t\t\t\t<select id=\"scrm_training_type\" name=\"training_type\">\n\t\t\t\t\t\t\t<option value=\"other\">Please select...<\/option>\n\t\t\t\t\t\t\t<option value=\"in_house\">In House<\/option>\n\t\t\t\t\t\t\t<option value=\"live_online\">Live Online<\/option>\n\t\t\t\t\t\t\t<option value=\"off_site\">Off Site<\/option>\n\t\t\t\t\t\t\t<option value=\"roving\">Roving<\/option>\n\t\t\t\t\t\t\t<option value=\"blended\">Blended<\/option>\n\t\t\t\t\t\t<\/select>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<div class=\"scrm-field\">\n\t\t\t\t\t\t<label for=\"scrm_source\">How did you hear about us?<\/label>\n\t\t\t\t\t\t<select id=\"scrm_source\" name=\"source\">\n\t\t\t\t\t\t\t<option value=\"other\">Please select...<\/option>\n\t\t\t\t\t\t\t<option value=\"referral\">Referral<\/option>\n\t\t\t\t\t\t\t<option value=\"web\">Web search<\/option>\n\t\t\t\t\t\t\t<option value=\"social\">Social media<\/option>\n\t\t\t\t\t\t\t<option value=\"event\">Event<\/option>\n\t\t\t\t\t\t\t<option value=\"repeat_client\">Returning client<\/option>\n\t\t\t\t\t\t<\/select>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"scrm-form-row\">\n\t\t\t\t\t<div class=\"scrm-field\">\n\t\t\t\t\t\t<label for=\"scrm_course_interest\">Course \/ Topic interested in<\/label>\n\t\t\t\t\t\t<input type=\"text\" id=\"scrm_course_interest\" name=\"course_interest\" placeholder=\"e.g. Leadership, Excel, Project Management\">\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"scrm-form-row\">\n\t\t\t\t\t<div class=\"scrm-field\">\n\t\t\t\t\t\t<label for=\"scrm_notes\">Message<\/label>\n\t\t\t\t\t\t<textarea id=\"scrm_notes\" name=\"notes\" rows=\"5\" placeholder=\"Tell us a bit about what you're looking for...\"><\/textarea>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\n\t\t\t\t<div class=\"scrm-form-row\">\n\t\t\t\t\t<button type=\"button\" id=\"scrm_submit_btn\" class=\"scrm-btn scrm-btn--primary\">\n\t\t\t\t\t\tSend Enquiry\t\t\t\t\t<\/button>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\n\t\t\t<div id=\"scrm-form-success\" style=\"display:none;\">\n\t\t\t\t<p class=\"scrm-success-msg\">Thank you for your enquiry! We&#039;ll be in touch shortly.<\/p>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\t\t<style>\n\t\t.scrm-form-wrap { max-width: 680px; margin: 0 auto; font-family: inherit; }\n\t\t.scrm-form-title { margin-bottom: 1.2em; }\n\t\t.scrm-form-row { margin-bottom: 1.1em; }\n\t\t.scrm-form-row--half { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }\n\t\t@media (max-width: 540px) { .scrm-form-row--half { grid-template-columns: 1fr; } }\n\t\t.scrm-field label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 0.9em; }\n\t\t.scrm-field label span { color: #c00; }\n\t\t.scrm-field input, .scrm-field select, .scrm-field textarea {\n\t\t\twidth: 100%; padding: 9px 12px; border: 1px solid #ccc;\n\t\t\tborder-radius: 4px; font-size: 1em; font-family: inherit;\n\t\t\tbox-sizing: border-box; background: #fff;\n\t\t}\n\t\t.scrm-field input:focus, .scrm-field select:focus, .scrm-field textarea:focus {\n\t\t\tborder-color: #0073aa; outline: 2px solid rgba(0,115,170,0.25);\n\t\t}\n\t\t.scrm-btn { padding: 10px 28px; border: none; border-radius: 4px; cursor: pointer; font-size: 1em; font-family: inherit; }\n\t\t.scrm-btn--primary { background: #0073aa; color: #fff; }\n\t\t.scrm-btn--primary:hover { background: #005d8c; }\n\t\t.scrm-btn:disabled { opacity: 0.6; cursor: not-allowed; }\n\t\t.scrm-notice { padding: 12px 16px; border-radius: 4px; margin-bottom: 1em; }\n\t\t.scrm-notice--error { background: #fce8e8; border: 1px solid #c00; color: #700; }\n\t\t.scrm-success-msg { padding: 16px 20px; background: #e8f5e9; border: 1px solid #4caf50; border-radius: 4px; color: #2e7d32; font-size: 1.05em; }\n\t\t<\/style>\n\n\t\t<script>\n\t\t(function() {\n\t\t\tconst apiUrl = \"https:\\\/\\\/creativity.com.au\\\/index.php\\\/wp-json\\\/sales-crm\\\/v1\\\/enquiries\\\/public\";\n\t\t\tconst nonce  = \"3177e170b8\";\n\n\t\t\tdocument.getElementById('scrm_submit_btn').addEventListener('click', async function() {\n\t\t\t\tconst btn    = this;\n\t\t\t\tconst notice = document.getElementById('scrm-form-notice');\n\n\t\t\t\tconst firstName = document.getElementById('scrm_first_name').value.trim();\n\t\t\t\tconst lastName  = document.getElementById('scrm_last_name').value.trim();\n\t\t\t\tconst email     = document.getElementById('scrm_email').value.trim();\n\n\t\t\t\tif ( ! firstName || ! lastName || ! email ) {\n\t\t\t\t\tnotice.innerHTML = '<div class=\"scrm-notice scrm-notice--error\">Please fill in all required fields.<\/div>';\n\t\t\t\t\tnotice.style.display = '';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tbtn.disabled = true;\n\t\t\t\tbtn.textContent = 'Sending...';\n\t\t\t\tnotice.style.display = 'none';\n\n\t\t\t\tconst payload = {\n\t\t\t\t\tfirst_name:      firstName,\n\t\t\t\t\tlast_name:       lastName,\n\t\t\t\t\temail:           email,\n\t\t\t\t\tphone:           document.getElementById('scrm_phone').value.trim(),\n\t\t\t\t\tcompany:         document.getElementById('scrm_company').value.trim(),\n\t\t\t\t\ttraining_type:   document.getElementById('scrm_training_type').value,\n\t\t\t\t\tsource:          document.getElementById('scrm_source').value,\n\t\t\t\t\tcourse_interest: document.getElementById('scrm_course_interest').value.trim(),\n\t\t\t\t\tnotes:           document.getElementById('scrm_notes').value.trim(),\n\t\t\t\t};\n\n\t\t\t\ttry {\n\t\t\t\t\tconst res  = await fetch(apiUrl, {\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\theaders: { 'Content-Type': 'application\/json', 'X-SCRM-Form-Nonce': nonce },\n\t\t\t\t\t\tbody: JSON.stringify(payload),\n\t\t\t\t\t});\n\t\t\t\t\tconst data = await res.json();\n\n\t\t\t\t\tif ( ! res.ok ) {\n\t\t\t\t\t\tnotice.innerHTML = '<div class=\"scrm-notice scrm-notice--error\">' + (data.message || 'Something went wrong. Please try again.') + '<\/div>';\n\t\t\t\t\t\tnotice.style.display = '';\n\t\t\t\t\t\tbtn.disabled = false;\n\t\t\t\t\t\tbtn.textContent = \"Send Enquiry\";\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tdocument.getElementById('scrm-form-fields').style.display = 'none';\n\t\t\t\t\tdocument.getElementById('scrm-form-success').style.display = '';\n\n\t\t\t\t} catch (err) {\n\t\t\t\t\tnotice.innerHTML = '<div class=\"scrm-notice scrm-notice--error\">Network error. Please try again.<\/div>';\n\t\t\t\t\tnotice.style.display = '';\n\t\t\t\t\tbtn.disabled = false;\n\t\t\t\t\tbtn.textContent = \"Send Enquiry\";\n\t\t\t\t}\n\t\t\t});\n\t\t})();\n\t\t<\/script>\n\t\t\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-2","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/creativity.com.au\/index.php\/wp-json\/wp\/v2\/pages\/2","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/creativity.com.au\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/creativity.com.au\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/creativity.com.au\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/creativity.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=2"}],"version-history":[{"count":2,"href":"https:\/\/creativity.com.au\/index.php\/wp-json\/wp\/v2\/pages\/2\/revisions"}],"predecessor-version":[{"id":8,"href":"https:\/\/creativity.com.au\/index.php\/wp-json\/wp\/v2\/pages\/2\/revisions\/8"}],"wp:attachment":[{"href":"https:\/\/creativity.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=2"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}