{% extends "_layouts/base.html" %}
{% block css %}
<style>
:root { --max: 900px; --pad: 16px; --border: #e5e7eb; --text: #111827; --muted:#6b7280; }
/* body { font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif; margin:0; color:var(--text); background:#fafafa; } */
.wrap { max-width: var(--max); margin: 0 auto; padding: 24px var(--pad); }
.card { background:#fff; border:1px solid var(--border); border-radius:12px; padding: 18px; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
h1 { font-size: 1.35rem; margin: 0 0 8px; }
p { margin: 8px 0; color: var(--muted); }
.grid { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 720px){ .grid { grid-template-columns: 1fr; } }
label { font-size: 1.25rem; font-weight: 600; display:block; margin: 10px 0 6px; }
.choices label { margin: 0; }
input, select { width:100%; padding: 10px 12px; border:1px solid var(--border); border-radius:10px; font-size: 1.25rem; background:#fff; }
fieldset { border:1px solid var(--border); border-radius:12px; padding: 14px; margin: 0 0 20px 0; }
legend { font-weight: 800; padding: 0 6px; margin-bottom:0px; border-bottom:none; }
.choices { display:grid; gap: 8px; margin-top: 8px; }
.choice { display:flex; align-items:flex-start; gap:10px; padding: 10px 10px; border:1px solid var(--border); border-radius:10px; cursor:pointer; }
.choice input { width:auto; margin-top: 3px; }
.choice:hover { background:#fcfcfc; }
.actions { display:flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
button { appearance:none; border:1px solid var(--border); background:#111827; color:#fff; padding: 10px 14px; border-radius:10px; font-weight: 700; cursor:pointer; }
button.secondary { background:#fff; color:#111827; }
button:disabled { opacity:.55; cursor:not-allowed; }
.error { color:#b91c1c; font-weight: 650; margin-top: 10px; }
.result { margin-top: 18px;background: rgba(227, 224, 224, 1);padding: 20px;border-radius: 10px;}
h2.result-title { font-size: 3rem; font-weight: 700; color:#000;}
#result p, #result p strong {
font-size:24px;
}
.pill { display:inline-block; padding: 4px 10px; border:1px solid var(--border); border-radius: 999px; font-weight: 700; font-size: 1.5rem; margin-right: 8px; }
.cta { display:inline-block; margin-top: 10px; padding: 10px 14px; border-radius: 10px; border:1px solid #111827; text-decoration:none; font-weight: 800; }
.cta.primary { background:#111827; color:#fff; }
.cta.secondary { background:#fff; color:#111827; }
.small { font-size: 1.1rem; color: var(--muted); }
.hr { height:1px; background: var(--border); margin: 14px 0; }
</style>
{% endblock %}
{% block content %}
<div class="wrap">
<div class="card">
<h1 class='text-blue' style='font-weight:700;'>Which HR Cert Prep Path is Right for You?</h1>
<p>Answer 10 quick questions to discover the best prep option for your learning style, preferences, and budget.</p>
<form id="prepAssessment" novalidate>
<div class="hr"></div>
<div class="grid">
<div>
<label for="firstName">First Name *</label>
<input id="firstName" name="firstName" type="text" autocomplete="given-name" required />
</div>
<div>
<label for="lastName">Last Name *</label>
<input id="lastName" name="lastName" type="text" autocomplete="family-name" required />
</div>
</div>
<div class="grid">
<div>
<label for="email">Email Address *</label>
<input id="email" name="email" type="email" autocomplete="email" required />
</div>
<div>
<label for="exam">Which exam are you planning to take? *</label>
<select id="exam" name="exam" required>
<option value="" selected disabled>Select one</option>
<option value="aPHR">aPHR</option>
<option value="PHR">PHR</option>
<option value="SPHR">SPHR</option>
<option value="SHRM-CP">SHRM-CP</option>
<option value="SHRM-SCP">SHRM-SCP</option>
<option value="Not sure">Not sure</option>
</select>
</div>
</div>
<fieldset style='margin-top:40px;'>
<legend>1. What is your preferred learning style?</legend>
<div class="choices">
<label class="choice"><input type="radio" name="q1" value="A" required> Independent; I learn best on my own</label>
<label class="choice"><input type="radio" name="q1" value="B"> Mostly independent, but I like schedules and checkpoints</label>
<label class="choice"><input type="radio" name="q1" value="C"> I learn best with a structured class and instructor</label>
<label class="choice"><input type="radio" name="q1" value="D"> I prefer learning in short segments with clear milestones to track my progress</label>
</div>
</fieldset>
<fieldset>
<legend>2. How much structure do you want?</legend>
<div class="choices">
<label class="choice"><input type="radio" name="q2" value="A" required> Minimal structure; I’ll create my own plan</label>
<label class="choice"><input type="radio" name="q2" value="B"> Some structure; a framework helps</label>
<label class="choice"><input type="radio" name="q2" value="D"> Moderate structure; I prefer to focus on specific topics</label>
<label class="choice"><input type="radio" name="q2" value="C"> High structure; I want an externally imposed schedule</label>
</div>
</fieldset>
<fieldset>
<legend>3. How important is flexibility in your schedule?</legend>
<div class="choices">
<label class="choice"><input type="radio" name="q3" value="A" required> Very important</label>
<label class="choice"><input type="radio" name="q3" value="B"> Important, but I can commit to some deadlines</label>
<label class="choice"><input type="radio" name="q3" value="C"> Not important; I can follow a fixed schedule</label>
<label class="choice"><input type="radio" name="q3" value="D"> Very important, but I still want a guided path</label>
</div>
</fieldset>
<fieldset>
<legend>4. How much accountability/support do you want?</legend>
<div class="choices">
<label class="choice"><input type="radio" name="q4" value="A" required> I’m self-motivated; I don’t need external accountability</label>
<label class="choice"><input type="radio" name="q4" value="B"> Some accountability would help</label>
<label class="choice"><input type="radio" name="q4" value="D"> I prefer clear milestones to track my own progress</label>
<label class="choice"><input type="radio" name="q4" value="C"> I want built-in accountability plus the ability to ask questions</label>
</div>
</fieldset>
<fieldset>
<legend>5. What’s your budget for exam prep?</legend>
<div class="choices">
<label class="choice"><input type="radio" name="q5" value="A" required> Under $500</label>
<label class="choice"><input type="radio" name="q5" value="B"> $500–$900</label>
<label class="choice"><input type="radio" name="q5" value="C"> $900–$1500</label>
<label class="choice"><input type="radio" name="q5" value="D"> Budget is flexible</label>
</div>
</fieldset>
<fieldset>
<legend>6. How soon do you plan to test?</legend>
<div class="choices">
<label class="choice"><input type="radio" name="q6" value="A" required> 0–6 weeks</label>
<label class="choice"><input type="radio" name="q6" value="B"> 2–3 months</label>
<label class="choice"><input type="radio" name="q6" value="C"> 3–6 months</label>
<label class="choice"><input type="radio" name="q6" value="D"> 6+ months / no set date yet</label>
</div>
</fieldset>
<fieldset>
<legend>7. How confident are you in your mastery of the HR body of knowledge right now?</legend>
<div class="choices">
<label class="choice"><input type="radio" name="q7" value="A" required> High</label>
<label class="choice"><input type="radio" name="q7" value="B"> Moderate</label>
<label class="choice"><input type="radio" name="q7" value="C"> Low</label>
<label class="choice"><input type="radio" name="q7" value="D"> Mixed</label>
</div>
</fieldset>
<fieldset>
<legend>8. Do you want proof of skills beyond certification (such as microcredentials or digital badges)?</legend>
<div class="choices">
<label class="choice"><input type="radio" name="q8" value="A" required> No, I don't need them at the moment</label>
<label class="choice"><input type="radio" name="q8" value="B"> Yes, they would be nice to have</label>
<label class="choice"><input type="radio" name="q8" value="C"> Yes, but it's not the top priority right now</label>
<label class="choice"><input type="radio" name="q8" value="D"> Yes, proof of skills is important to me</label>
</div>
</fieldset>
<fieldset>
<legend>9. Which content format do you prefer?</legend>
<div class="choices">
<label class="choice"><input type="radio" name="q9" value="A" required>Book-length self-guided content is fine</label>
<label class="choice"><input type="radio" name="q9" value="B"> Book-length is okay, but I want it structured</label>
<label class="choice"><input type="radio" name="q9" value="C"> Some reading is fine, but I want an instructor to guide me</label>
<label class="choice"><input type="radio" name="q9" value="D"> I prefer smaller chunks of guided content</label>
</div>
</fieldset>
<fieldset>
<legend>10. Which statement sounds most like you?</legend>
<div class="choices">
<label class="choice"><input type="radio" name="q10" value="A" required> I want the lowest-cost option and full control.</label>
<label class="choice"><input type="radio" name="q10" value="B"> I want a blend of flexibility and structure.</label>
<label class="choice"><input type="radio" name="q10" value="C"> I want guided instruction and a set pace.</label>
<label class="choice"><input type="radio" name="q10" value="D"> I want to earn credentials as I go.</label>
</div>
</fieldset>
<div class="actions">
<button class='btn btn-blue btn-lg' type="submit">Get My Recommendation</button>
</div>
<p class='small'>By submitting this form, you consent to receive marketing and promotional communications from HRCP via email. You may opt out of these communications at any time by clicking the unsubscribe link included in our emails or by contacting us directly. For more information about how we handle your personal data, please review our <a href="https://hrcp.com/privacy_and_security/" target="_blank" rel="noopener noreferrer">Privacy Policy</a></p>
<div id="error" class="error" aria-live="polite"></div>
<div id="result" class="result" aria-live="polite" style="display:none;"></div>
</form>
</div>
</div>
<script>
(function () {
const form = document.getElementById('prepAssessment');
const errorEl = document.getElementById('error');
const resultEl = document.getElementById('result');
const HUBSPOT_PORTAL_ID = 22596955;
const HUBSPOT_FORM_GUID = '52935804-2158-4adc-8190-c7c1e24cec52';
const HUBSPOT_ENDPOINT =
`https://api.hsforms.com/submissions/v3/integration/submit/${HUBSPOT_PORTAL_ID}/${HUBSPOT_FORM_GUID}`;
const LINKS = {
selfStudy: "https://hrcp.com/products/phr-sphr/",
prepCourse: "https://hrcp.com/products/online-instructor-led-courses/",
microPath: "https://micro.hrcp.com/products/13-micro-hr-badge-bundle-hr-certification-2150-question-test-bank-890/"
};
function scoreChoice(letter, scores) {
switch (letter) {
case "A": scores.SS += 2; break;
case "B": scores.SS += 1; scores.MH += 1; break;
case "C": scores.PC += 2; break;
case "D": scores.MH += 2; break;
}
}
function getRadioValue(name) {
const el = form.querySelector(`input[name="${name}"]:checked`);
return el ? el.value : null;
}
function pickWinner(scores, tieInfo) {
const entries = [["SS", scores.SS], ["PC", scores.PC], ["MH", scores.MH]]
.sort((a, b) => b[1] - a[1]);
if (entries[0][1] > entries[1][1]) return entries[0][0];
if (tieInfo.q5 === "A") return "SS";
if (tieInfo.q4 === "C") return "PC";
if (tieInfo.q8 === "D") return "MH";
return entries[0][0];
}
function getRecommendation(code) {
if (code === "SS") {
return {
label: "Self-Study",
url: LINKS.selfStudy,
price: "$175–$480"
};
}
if (code === "PC") {
return {
label: "Preparation Course",
url: LINKS.prepCourse,
price: "$800–$1500"
};
}
return {
label: "Micro HR Path",
url: LINKS.microPath,
price: "$700–$1200"
};
}
function getCookie(name) {
const match = document.cookie.match(new RegExp('(^|; )' + name + '=([^;]*)'));
return match ? decodeURIComponent(match[2]) : "";
}
function validateEmail(email) {
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
}
form.addEventListener('change', function (e) {
if (e.target.type !== 'radio' || !/^q\d+$/.test(e.target.name)) return;
const fieldsets = form.querySelectorAll('fieldset');
const currentFieldset = e.target.closest('fieldset');
if (!currentFieldset) return;
const index = Array.prototype.indexOf.call(fieldsets, currentFieldset);
const nextTarget = fieldsets[index + 1] || form.querySelector('.actions');
if (nextTarget) {
nextTarget.scrollIntoView({ behavior: 'smooth', block: 'start' });
}
});
form.addEventListener('submit', async function (e) {
e.preventDefault();
errorEl.textContent = "";
resultEl.style.display = "none";
resultEl.innerHTML = "";
const firstName = document.getElementById('firstName').value.trim();
const lastName = document.getElementById('lastName').value.trim();
const email = document.getElementById('email').value.trim();
if (!firstName) {
errorEl.textContent = "Please enter your first name.";
return;
}
if (!lastName) {
errorEl.textContent = "Please enter your last name.";
return;
}
if (!email || !validateEmail(email)) {
errorEl.textContent = "Please enter a valid email address.";
return;
}
const scores = { SS: 0, PC: 0, MH: 0 };
const answers = {};
for (let i = 1; i <= 10; i++) {
const val = getRadioValue(`q${i}`);
if (!val) {
errorEl.textContent = `Please answer Question ${i}.`;
return;
}
answers[`q${i}`] = val;
scoreChoice(val, scores);
}
const winnerCode = pickWinner(scores, {
q4: answers.q4,
q5: answers.q5,
q8: answers.q8
});
const recommendation = getRecommendation(winnerCode);
const answer_dict = {
"q1":"1_what_is_your_preferred_learning_style_",
"q2":"2_how_much_structure_do_you_want_",
"q3":"3_how_important_is_flexibility_in_your_schedule_",
"q4":"4_how_much_accountability_support_do_you_want_",
"q5":"5_what_s_your_budget_for_exam_prep_",
"q6":"6_how_soon_do_you_plan_to_test_",
"q7":"7_how_confident_are_you_in_your_mastery_of_the_hr_body_of_knowledge_right_now_",
"q8":"8_do_you_want_proof_of_skills_beyond_certification_",
"q9":"9_which_content_format_do_you_prefer_",
"q10":"10_which_statement_sounds_most_like_you_",
};
const hubspotPayload = {
submittedAt: Date.now().toString(),
fields: [
{ name: "firstname", value: firstName },
{ name: "lastname", value: lastName },
{ name: "email", value: email },
{ name: "prep_recommendation", value: recommendation.label },
...Object.entries(answer_dict).map(([key, hubspotName]) => ({ name: hubspotName, value: answers[key] })),
],
context: {
hutk: getCookie("hubspotutk"),
pageUri: window.location.href,
pageName: document.title
}
};
console.log(hubspotPayload);
try {
const response = await fetch(HUBSPOT_ENDPOINT, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(hubspotPayload)
});
if (!response.ok) {
const text = await response.text();
throw new Error(text || "HubSpot submission failed");
}
resultEl.innerHTML = `
<h2 class="result-title" style="margin:10px 0 6px; font-size:2rem;">
<span>Your best match</span>: <span class="result-recommendation">${recommendation.label}</span>
</h2>
<p><strong>Typical cost:</strong> ${recommendation.price}</p>
<a class="btn btn-blue btn-lg" href="${recommendation.url}" target="_blank" rel="noopener">
Explore this option
</a>
`;
resultEl.style.display = "block";
resultEl.scrollIntoView({ behavior: "smooth", block: "start" });
} catch (err) {
console.error(err);
errorEl.textContent = "We couldn't save your result right now. Please try again.";
}
});
})();
</script>
{% endblock %}