{"id":7621,"date":"2025-09-03T10:16:42","date_gmt":"2025-09-03T10:16:42","guid":{"rendered":"https:\/\/drmazharhussain.com\/ht\/?page_id=7621"},"modified":"2025-10-17T20:46:08","modified_gmt":"2025-10-17T20:46:08","slug":"hair-transplant-graft-calculator","status":"publish","type":"page","link":"https:\/\/drmazharhussain.com\/ht\/hair-transplant-graft-calculator\/","title":{"rendered":"Graft Calculator"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"7621\" class=\"elementor elementor-7621\">\n\t\t\t\t<div class=\"elementor-element elementor-element-3ba3928 e-flex e-con-boxed e-con e-parent\" data-id=\"3ba3928\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-60ac3f6 elementor-widget elementor-widget-html\" data-id=\"60ac3f6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>My Hair Clinic - Assessment Form<\/title>\n    <script src=\"https:\/\/js.hcaptcha.com\/1\/api.js\" async defer><\/script>\n<\/head>\n\n<style>\n\/* Brand Colors: Black #000000, Gold #BFA866, White #FFFFFF *\/\n* {\n    margin: 0;\n    padding: 0;\n    box-sizing: border-box;\n}\n\nbody {\n    font-family: 'Lato', system-ui, Arial, sans-serif;\n    background-color: #000000;\n    color: #FFFFFF;\n    line-height: 1.6;\n    min-height: 100vh;\n}\n\n.calculator-container {\n    max-width: 800px;\n    margin: 0 auto;\n    padding: 20px;\n}\n\n\/* Typography *\/\nh1, h2, h3 {\n    font-family: 'Playfair Display', Georgia, Times, serif;\n    color: #BFA866 !important;\n    margin-bottom: 1rem;\n}\n\nh1 {\n    font-size: 2.5rem !important;\n    text-align: center !important;\n    margin-bottom: 2rem !important;\n    letter-spacing: 2px !important;\n}\n\nh2 {\n    font-size: 1.8rem;\n    border-bottom: 2px solid #BFA866;\n    padding-bottom: 0.5rem;\n    margin-bottom: 1.5rem;\n}\n\nh3 {\n    font-size: 1.3rem;\n    margin-bottom: 1rem;\n}\n\n\/* Form Sections *\/\n.form-section {\n    background: rgba(191, 168, 102, 0.1);\n    border: 1px solid #BFA866;\n    border-radius: 8px;\n    padding: 2rem;\n    margin-bottom: 2rem;\n}\n\n.form-group {\n    margin-bottom: 1.5rem;\n}\n\nlabel {\n    display: block;\n    margin-bottom: 0.5rem;\n    font-weight: 600;\n    color: #FFFFFF;\n}\n\ninput, select, textarea {\n    width: 100%;\n    padding: 0.75rem;\n    border: 1px solid #BFA866;\n    border-radius: 4px;\n    background-color: #1a1a1a !important;\n    color: #FFFFFF !important;\n    font-size: 1rem;\n}\n\ninput:focus, select:focus, textarea:focus {\n    outline: none;\n    border-color: #BFA866 !important;\n    box-shadow: 0 0 5px rgba(191, 168, 102, 0.3) !important;\n}\n\n\/* Checkboxes *\/\n.checkbox-group {\n    display: grid;\n    gap: 1rem;\n    margin-top: 1rem;\n}\n\n.checkbox-item {\n    display: flex;\n    align-items: center;\n    padding: 1rem;\n    border: 1px solid #444;\n    border-radius: 4px;\n    cursor: pointer;\n    transition: all 0.3s ease;\n}\n\n.checkbox-item:hover {\n    border-color: #BFA866;\n    background: rgba(191, 168, 102, 0.05);\n}\n\n.checkbox-item input[type=\"checkbox\"] {\n    width: auto;\n    margin-right: 1rem;\n    transform: scale(1.2);\n}\n\n.checkbox-item.checked {\n    border-color: #BFA866;\n    background: rgba(191, 168, 102, 0.1);\n}\n\n\/* Hair Characteristics *\/\n.char-grid {\n    display: grid;\n    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n    gap: 1rem;\n}\n\n\/* Toggle Switch *\/\n.toggle-container {\n    display: flex;\n    align-items: center;\n    gap: 1rem;\n    padding: 1rem;\n    background: rgba(191, 168, 102, 0.05);\n    border-radius: 4px;\n    border: 1px solid #444;\n}\n\n.toggle {\n    position: relative;\n    width: 60px;\n    height: 30px;\n    background: #444;\n    border-radius: 15px;\n    cursor: pointer;\n    transition: background 0.3s;\n}\n\n.toggle.active {\n    background: #BFA866;\n}\n\n.toggle::after {\n    content: '';\n    position: absolute;\n    width: 26px;\n    height: 26px;\n    border-radius: 50%;\n    background: white;\n    top: 2px;\n    left: 2px;\n    transition: transform 0.3s;\n}\n\n.toggle.active::after {\n    transform: translateX(30px);\n}\n\n\/* Radio button styling *\/\n.radio-group {\n    display: flex;\n    gap: 2rem;\n    margin-top: 0.75rem;\n    align-items: center;\n}\n\n.radio-item {\n    display: flex;\n    align-items: center;\n    gap: 0.5rem;\n}\n\n.radio-item input[type=\"radio\"] {\n    width: auto !important;\n    margin: 0 !important;\n    transform: scale(1.2);\n    accent-color: #BFA866;\n}\n\n.radio-item label {\n    margin: 0 !important;\n    color: #FFFFFF !important;\n    font-weight: normal;\n    cursor: pointer;\n}\n\n\/* Buttons *\/\n.btn {\n    background: #BFA866;\n    color: #000000;\n    border: none;\n    padding: 1rem 2rem;\n    border-radius: 4px;\n    font-size: 1.1rem;\n    font-weight: 600;\n    cursor: pointer;\n    transition: all 0.3s ease;\n    text-transform: uppercase;\n    letter-spacing: 1px;\n}\n\n.btn:hover {\n    background: #d4be7a;\n    transform: translateY(-2px);\n}\n\n.btn:disabled {\n    background: #666;\n    cursor: not-allowed;\n    transform: none;\n}\n\n\/* Alert Boxes *\/\n.alert {\n    padding: 1rem;\n    border-radius: 4px;\n    margin: 1rem 0;\n}\n\n.alert-warning {\n    background: rgba(191, 168, 102, 0.2);\n    border: 1px solid #BFA866;\n    color: #FFFFFF;\n}\n\n.alert-success {\n    background: rgba(76, 175, 80, 0.2);\n    border: 1px solid #4CAF50;\n    color: #FFFFFF;\n}\n\n.alert-error {\n    background: rgba(244, 67, 54, 0.2);\n    border: 1px solid #f44336;\n    color: #FFFFFF;\n}\n\n\/* hCaptcha Container *\/\n.hcaptcha-container {\n    display: flex;\n    justify-content: center;\n    margin: 1.5rem 0;\n}\n\n\/* Footer *\/\n.footer {\n    margin-top: 3rem;\n    padding: 2rem;\n    border-top: 1px solid #444;\n    text-align: center;\n    font-size: 0.9rem;\n    color: #FFFFFF;\n}\n\n.footer .contact-info {\n    margin-bottom: 1rem;\n}\n\n\/* Responsive *\/\n@media (max-width: 768px) {\n    .calculator-container {\n        padding: 10px;\n    }\n    \n    h1 {\n        font-size: 2rem !important;\n    }\n    \n    .form-section {\n        padding: 1rem;\n    }\n    \n    .char-grid {\n        grid-template-columns: 1fr;\n    }\n}\n\n.hidden {\n    display: none !important;\n}\n<\/style>\n\n<body>\n\n<div class=\"calculator-container\">\n    <header>\n        <h1>MY HAIR CLINIC<\/h1>\n        <p style=\"text-align: center; color: #BFA866; font-size: 1.1rem; margin-bottom: 2rem;\">\n            Advanced FUE Hair Transplantation - Assessment Form\n        <\/p>\n    <\/header>\n\n    <form id=\"assessmentForm\">\n        <!-- Patient Information -->\n        <section class=\"form-section\">\n            <h2>Patient Information<\/h2>\n            \n            <div class=\"form-group\">\n                <label for=\"patientName\">Full Name *<\/label>\n                <input type=\"text\" id=\"patientName\" name=\"patientName\" required>\n            <\/div>\n\n            <div class=\"form-group\">\n                <label for=\"patientEmail\">Email *<\/label>\n                <input type=\"email\" id=\"patientEmail\" name=\"patientEmail\" required>\n            <\/div>\n\n            <div class=\"form-group\">\n                <label for=\"patientPhone\">Phone Number *<\/label>\n                <input type=\"tel\" id=\"patientPhone\" name=\"patientPhone\" required>\n            <\/div>\n\n            <div class=\"form-group\">\n                <label for=\"patientAge\">Age *<\/label>\n                <input type=\"number\" id=\"patientAge\" name=\"patientAge\" min=\"18\" max=\"80\" required>\n            <\/div>\n\n            <div class=\"form-group\">\n                <label for=\"locationPreference\">Preferred Location<\/label>\n                <select id=\"locationPreference\" name=\"locationPreference\">\n                    <option value=\"\">Select preferred location<\/option>\n                    <option value=\"Dubai\">Dubai<\/option>\n                    <option value=\"Oslo\">Oslo<\/option>\n                    <option value=\"Islamabad\">Islamabad<\/option>\n                <\/select>\n            <\/div>\n        <\/section>\n\n        <!-- Areas to Restore -->\n        <section class=\"form-section\">\n            <h2>Areas to Restore<\/h2>\n            <p>Select the areas you wish to restore (at least one required):<\/p>\n            <p style=\"font-size: 0.9rem; color: #BFA866; margin-top: 0.5rem;\">Note: You can select one front area option + crown if needed<\/p>\n            \n            <div class=\"checkbox-group\">\n                <div class=\"checkbox-item\">\n                    <input type=\"checkbox\" id=\"areaFront\" name=\"frontOption\" value=\"frontOnly\">\n                    <label for=\"areaFront\">Front Hairline<\/label>\n                <\/div>\n                <div class=\"checkbox-item\">\n                    <input type=\"checkbox\" id=\"areaFrontTemples\" name=\"frontOption\" value=\"frontTemples\">\n                    <label for=\"areaFrontTemples\">Front Hairline + Temples<\/label>\n                <\/div>\n                <div class=\"checkbox-item\">\n                    <input type=\"checkbox\" id=\"areaFrontTemplesMid\" name=\"frontOption\" value=\"frontTemplesMid\">\n                    <label for=\"areaFrontTemplesMid\">Front Hairline + Temples + Mid-Scalp<\/label>\n                <\/div>\n                <div class=\"checkbox-item\">\n                    <input type=\"checkbox\" id=\"areaCrown\" name=\"crownOption\" value=\"crown\">\n                    <label for=\"areaCrown\">Crown<\/label>\n                <\/div>\n            <\/div>\n        <\/section>\n\n        <!-- Hair Characteristics -->\n        <section class=\"form-section\">\n            <h2>Hair Characteristics (Optional)<\/h2>\n            <p>These factors help refine your assessment:<\/p>\n            \n            <div class=\"char-grid\">\n                <div class=\"form-group\">\n                    <label for=\"hairCaliber\">Hair Thickness<\/label>\n                    <select id=\"hairCaliber\" name=\"hairCaliber\">\n                        <option value=\"medium\">Medium (Most common)<\/option>\n                        <option value=\"fine\">Fine<\/option>\n                        <option value=\"coarse\">Coarse<\/option>\n                    <\/select>\n                <\/div>\n\n                <div class=\"form-group\">\n                    <label for=\"donorDensity\">Donor Area Density<\/label>\n                    <select id=\"donorDensity\" name=\"donorDensity\">\n                        <option value=\"average\">Average<\/option>\n                        <option value=\"high\">High<\/option>\n                        <option value=\"low\">Low<\/option>\n                    <\/select>\n                <\/div>\n\n                <div class=\"form-group\">\n                    <label for=\"hairCurl\">Hair Texture<\/label>\n                    <select id=\"hairCurl\" name=\"hairCurl\">\n                        <option value=\"straight\">Straight<\/option>\n                        <option value=\"wavy\">Wavy<\/option>\n                        <option value=\"curly\">Curly<\/option>\n                    <\/select>\n                <\/div>\n            <\/div>\n        <\/section>\n\n        <!-- Medical History -->\n        <section class=\"form-section\">\n            <h2>Medical History<\/h2>\n            \n            <div class=\"form-group\">\n                <label>Have you had any previous hair transplant surgery?<\/label>\n                <div class=\"radio-group\">\n                    <div class=\"radio-item\">\n                        <input type=\"radio\" id=\"priorYes\" name=\"priorSurgery\" value=\"true\">\n                        <label for=\"priorYes\">Yes<\/label>\n                    <\/div>\n                    <div class=\"radio-item\">\n                        <input type=\"radio\" id=\"priorNo\" name=\"priorSurgery\" value=\"false\" checked>\n                        <label for=\"priorNo\">No<\/label>\n                    <\/div>\n                <\/div>\n                \n                <div id=\"priorSurgeryNote\" class=\"alert alert-warning hidden\" style=\"margin-top: 1rem;\">\n                    <small>Note: Repair cases may require modified planning and additional consultation.<\/small>\n                <\/div>\n            <\/div>\n\n            <div class=\"form-group\">\n                <div class=\"toggle-container\">\n                    <span>Still losing hair \/ Haven't lost everything yet<\/span>\n                    <div class=\"toggle\" id=\"notLostEverythingToggle\"><\/div>\n                    <input type=\"hidden\" id=\"notLostEverything\" name=\"notLostEverything\" value=\"false\">\n                <\/div>\n                <small style=\"color: #FFFFFF; display: block; margin-top: 0.5rem;\">\n                    Enable this if you're experiencing ongoing hair loss or in early stages\n                <\/small>\n            <\/div>\n        <\/section>\n\n        <!-- Consent & hCaptcha -->\n        <section class=\"form-section\">\n            <div class=\"form-group\">\n                <div class=\"checkbox-item\">\n                    <input type=\"checkbox\" id=\"consent\" name=\"consent\" required>\n                    <label for=\"consent\">\n                        I understand this is an assessment and consent to My Hair Clinic contacting me about my hair restoration consultation. *\n                    <\/label>\n                <\/div>\n            <\/div>\n\n            <!-- hCaptcha Widget -->\n            <div class=\"hcaptcha-container\">\n                <div class=\"h-captcha\" \n                     data-sitekey=\"905e131c-2d2c-435c-a188-5fccbf7ee882\" \n                     data-theme=\"dark\">\n                <\/div>\n            <\/div>\n        <\/section>\n\n        <!-- Action Buttons -->\n        <div style=\"text-align: center; margin: 2rem 0;\">\n            <button type=\"button\" id=\"submitBtn\" class=\"btn\">Submit Assessment<\/button>\n        <\/div>\n    <\/form>\n\n    <!-- Footer -->\n    <footer class=\"footer\">\n        <div class=\"contact-info\">\n            <strong style=\"color: #BFA866;\">Contact My Hair Clinic<\/strong><br>\n            UAE WhatsApp: +971 58 247 0065 | International WhatsApp: +47 939 23 223<br>\n            Email: info@myhairclinic.ae | info@myhairclinic.com\n        <\/div>\n        <div>\n            <strong>Dubai Clinic:<\/strong> 4013, Block C, Al Razi Medical Complex, Building 64, DHCC, Dubai, UAE<br>\n            <em>Free online consultation available. No walk-ins.<\/em>\n        <\/div>\n    <\/footer>\n<\/div>\n\n<script>\nconst CONFIG = {\n    areaRanges: {\n        frontOnly: { min: 800, max: 1100 },\n        frontTemples: { min: 1700, max: 2000 },\n        frontTemplesMid: { min: 2700, max: 3200 },\n        crown: { min: 2000, max: 2200 }\n    }\n};\n\ndocument.addEventListener('DOMContentLoaded', function() {\n    initializeForm();\n});\n\nfunction initializeForm() {\n    setupEventListeners();\n    setupToggle();\n    setupAreaCheckboxes();\n}\n\nfunction setupEventListeners() {\n    document.getElementById('submitBtn').addEventListener('click', submitAssessment);\n    document.querySelectorAll('input[name=\"priorSurgery\"]').forEach(radio => {\n        radio.addEventListener('change', handlePriorSurgeryChange);\n    });\n    \n    document.querySelectorAll('input[name=\"frontOption\"]').forEach(checkbox => {\n        checkbox.addEventListener('change', function() {\n            if (this.checked) {\n                document.querySelectorAll('input[name=\"frontOption\"]').forEach(other => {\n                    if (other !== this) other.checked = false;\n                });\n            }\n        });\n    });\n}\n\nfunction setupToggle() {\n    const toggle = document.getElementById('notLostEverythingToggle');\n    const hiddenInput = document.getElementById('notLostEverything');\n    \n    toggle.addEventListener('click', function() {\n        this.classList.toggle('active');\n        hiddenInput.value = this.classList.contains('active').toString();\n    });\n}\n\nfunction setupAreaCheckboxes() {\n    const areaCheckboxes = document.querySelectorAll('input[name=\"frontOption\"], input[name=\"crownOption\"]');\n    \n    areaCheckboxes.forEach(checkbox => {\n        checkbox.addEventListener('change', function() {\n            const checkboxItem = this.closest('.checkbox-item');\n            if (this.checked) {\n                checkboxItem.classList.add('checked');\n            } else {\n                checkboxItem.classList.remove('checked');\n            }\n        });\n    });\n}\n\nfunction handlePriorSurgeryChange() {\n    const priorNote = document.getElementById('priorSurgeryNote');\n    const priorYes = document.getElementById('priorYes').checked;\n    \n    if (priorYes) {\n        priorNote.classList.remove('hidden');\n    } else {\n        priorNote.classList.add('hidden');\n    }\n}\n\nfunction validateForm() {\n    const errors = [];\n    \n    const name = document.getElementById('patientName').value.trim();\n    if (!name) {\n        errors.push('Name is required');\n    }\n    \n    const email = document.getElementById('patientEmail').value.trim();\n    const phone = document.getElementById('patientPhone').value.trim();\n    if (!email && !phone) {\n        errors.push('Please provide either email or phone number');\n    }\n    \n    const selectedAreas = getSelectedAreas();\n    if (selectedAreas.length === 0) {\n        errors.push('Please select at least one area to restore');\n    }\n    \n    const consent = document.getElementById('consent').checked;\n    if (!consent) {\n        errors.push('Please provide consent to proceed');\n    }\n    \n    \/\/ Validate hCaptcha - get response from textarea\n    const hcaptchaTextarea = document.querySelector('textarea[name=\"h-captcha-response\"]');\n    if (!hcaptchaTextarea || !hcaptchaTextarea.value) {\n        errors.push('Please complete the CAPTCHA verification');\n    }\n    \n    return errors;\n}\n\nfunction buildEmailMessage(patientName, estimates, patientAge, selectedAreas) {\n    const isCrownSelected = selectedAreas.includes('crown');\n    const subject = \"Your Hair Transplant Estimate from My Hair Clinic\";\n    \n    if (patientAge && patientAge < 35 && isCrownSelected) {\n        const body = `Hi ${patientName},\n\nThank you for using our graft calculator.\n\nYour estimated number of grafts is: ${estimates.total.min} \u2013 ${estimates.total.max}\n\nHowever, we generally do not recommend transplantation to the crown under 35, as using grafts there too early can compromise long-term results.\n\nWhat we suggest\n\nWe recommend you book a 60-minute consultation with Dr. Hussain. During this, you'll receive:\n\n\u2022 A clear, personalised plan\n\u2022 A more precise estimate of how many grafts can be transplanted\n\u2022 Guidance on what we can aim for in the short and long term\n\nBest regards,\nMy Hair Clinic\n\nWhatsApp: +971 58 247 0065 | Email: info@myhairclinic.com\n\nDisclaimer: This is an automated estimate and not a medical decision. Final recommendations follow an individual consultation with Dr. Hussain.`;\n        return { subject, body };\n    }\n    else if (patientAge && patientAge >= 35 && isCrownSelected) {\n        const body = `Hi ${patientName},\n\nThank you for using our graft calculator.\nYour estimated number of grafts is ${estimates.total.min} \u2013 ${estimates.total.max}\n\nBecause you selected treatment for the crown, it's important to know that Dr. Hussain generally recommends a staged approach, starting with the front and mid-scalp first. These areas frame your face and have the greatest impact on your appearance.\n\nThe crown may be addressed later if your donor capacity (scalp \u00b1 beard\/body) is sufficient.\n\nWhat we suggest\nWe recommend you book a 60-minute consultation with Dr. Hussain. During this, you'll receive:\n\n\u2022 A clear, personalised treatment plan\n\u2022 A more precise estimate of grafts for each stage\n\u2022 Guidance on what we can realistically achieve in the short and long term\n\nBest regards,\nMy Hair Clinic\n\nWhatsApp: +971 58 247 0065 | Email: info@myhairclinic.com\n\nDisclaimer: This is an automated estimate and not a medical decision. Final recommendations follow an individual consultation with Dr. Hussain.`;\n        return { subject, body };\n    }\n    else {\n        const body = `Hi ${patientName},\n\nThank you for using our graft calculator.\nYour estimated number of grafts is: ${estimates.total.min} \u2013 ${estimates.total.max}\n\nTo make sure you get the best, most natural outcome, we recommend you book a 60-minute consultation with Dr. Hussain. During this, you'll receive:\n\n\u2022 A clear, personalised treatment plan\n\u2022 A more precise estimate of how many grafts can be transplanted\n\u2022 Guidance on what we can aim for in the short and long term\n\nBest regards,\nMy Hair Clinic\n\nWhatsApp: +971 58 247 0065 | Email: info@myhairclinic.com\n\nDisclaimer: This is an automated estimate and not a medical decision. Final recommendations follow an individual consultation with Dr. Hussain.`;\n        return { subject, body };\n    }\n}\n\nfunction submitAssessment() {\n    const errors = validateForm();\n    if (errors.length > 0) {\n        alert('Please complete the required fields:\\n' + errors.join('\\n'));\n        return;\n    }\n\n    const selectedAreas = getSelectedAreas();\n    const estimates = computeAreaRanges(selectedAreas);\n    const recommendation = determineRecommendation();\n    const assessmentData = buildAssessmentData(estimates, recommendation);\n\n    const patientName = document.getElementById('patientName').value.trim();\n    const patientAge = parseInt(document.getElementById('patientAge').value) || null;\n    const emailMessage = buildEmailMessage(patientName, estimates, patientAge, selectedAreas);\n\n    submitToCF7(assessmentData, emailMessage);\n}\n\nfunction getSelectedAreas() {\n    const areas = [];\n    \n    const frontOption = document.querySelector('input[name=\"frontOption\"]:checked');\n    if (frontOption) areas.push(frontOption.value);\n    \n    const crownOption = document.querySelector('input[name=\"crownOption\"]:checked');\n    if (crownOption) areas.push(crownOption.value);\n    \n    return areas;\n}\n\nfunction computeAreaRanges(selectedAreas) {\n    const estimates = {\n        perArea: {},\n        total: { min: 0, max: 0 }\n    };\n    \n    selectedAreas.forEach(area => {\n        if (CONFIG.areaRanges[area]) {\n            const baseRange = CONFIG.areaRanges[area];\n            estimates.perArea[area] = {\n                min: baseRange.min,\n                max: baseRange.max\n            };\n            \n            estimates.total.min += baseRange.min;\n            estimates.total.max += baseRange.max;\n        }\n    });\n    \n    return estimates;\n}\n\nfunction determineRecommendation() {\n    const notLostEverything = document.getElementById('notLostEverything').value === 'true';\n    const selectedAreas = getSelectedAreas();\n    const hasCrown = selectedAreas.includes('crown');\n    \n    if (notLostEverything) {\n        return {\n            path: 'Medical Hair Restoration + Future FUE Consideration',\n            notes: 'Based on assessment, recommend starting with Medical Hair Restoration to slow further hair loss. FUE can be considered later depending on response to treatment.'\n        };\n    } else if (hasCrown && selectedAreas.length > 1) {\n        return {\n            path: 'Comprehensive FUE Hair Transplantation',\n            notes: 'Based on your selection of multiple areas including the crown, a comprehensive FUE procedure is recommended for full coverage and natural-looking results.'\n        };\n    } else {\n        return {\n            path: 'FUE Hair Transplantation',\n            notes: 'Based on your selected areas, FUE (Follicular Unit Extraction) hair transplantation is recommended for natural-looking results with minimal scarring.'\n        };\n    }\n}\n\nfunction buildAssessmentData(estimates, recommendation) {\n    const selectedAreas = getSelectedAreas();\n    \n    const areaNames = [];\n    if (selectedAreas.includes('frontOnly')) areaNames.push('Front Hairline Only');\n    if (selectedAreas.includes('frontTemples')) areaNames.push('Front Hairline + Temples');\n    if (selectedAreas.includes('frontTemplesMid')) areaNames.push('Front Hairline + Temples + Mid-Scalp');\n    if (selectedAreas.includes('crown')) areaNames.push('Crown');\n    \n    let areaEstimatesText = '';\n    Object.keys(estimates.perArea).forEach(area => {\n        const range = estimates.perArea[area];\n        const areaName = getAreaDisplayName(area);\n        areaEstimatesText += `${areaName}: ${range.min} - ${range.max} grafts\\n`;\n    });\n    \n    return `HAIR RESTORATION ASSESSMENT\n===========================\n\nPATIENT INFORMATION:\nName: ${document.getElementById('patientName').value.trim()}\nEmail: ${document.getElementById('patientEmail').value.trim() || 'Not provided'}\nPhone: ${document.getElementById('patientPhone').value.trim() || 'Not provided'}\nAge: ${document.getElementById('patientAge').value || 'Not provided'}\nPreferred Location: ${document.getElementById('locationPreference').value || 'Not specified'}\n\nASSESSMENT DETAILS:\nAreas to Restore: ${areaNames.join(', ') || 'None selected'}\nPrior Surgery: ${document.querySelector('input[name=\"priorSurgery\"]:checked').value === 'true' ? 'Yes' : 'No'}\nStill Losing Hair: ${document.getElementById('notLostEverything').value === 'true' ? 'Yes' : 'No'}\n\nHAIR CHARACTERISTICS:\nCaliber: ${document.getElementById('hairCaliber').value}\nDonor Density: ${document.getElementById('donorDensity').value}\nCurl: ${document.getElementById('hairCurl').value}\n\nCALCULATED ESTIMATES:\nTotal Graft Range: ${estimates.total.min} - ${estimates.total.max} grafts\n\nArea Breakdown:\n${areaEstimatesText}\n\nRECOMMENDATION:\nTreatment Path: ${recommendation.path}\nNotes: ${recommendation.notes}\n\nSubmitted: ${new Date().toLocaleString()}\nSource: My Hair Clinic Assessment Calculator`;\n}\n\nfunction getAreaDisplayName(area) {\n    const displayNames = {\n        frontOnly: 'Front Hairline Only',\n        frontTemples: 'Front Hairline + Temples',\n        frontTemplesMid: 'Front Hairline + Temples + Mid-Scalp',\n        crown: 'Crown'\n    };\n    return displayNames[area] || area;\n}\n\nfunction submitToCF7(assessmentData, emailMessage) {\n    const saveBtn = document.getElementById('submitBtn');\n    const originalText = saveBtn.textContent;\n    saveBtn.textContent = 'Submitting...';\n    saveBtn.disabled = true;\n\n    const formData = new FormData();\n    const formId = '7562';\n    \n    formData.append('_wpcf7', formId);\n    formData.append('_wpcf7_version', '5.9'); \n    formData.append('_wpcf7_locale', 'en_US');\n    formData.append('_wpcf7_unit_tag', 'wpcf7-f' + formId + '-o1');\n    \n    formData.append('patient_name', document.getElementById('patientName').value.trim());\n    formData.append('patient_email', document.getElementById('patientEmail').value.trim());\n    formData.append('patient_phone', document.getElementById('patientPhone').value.trim());\n    formData.append('assessment_data', assessmentData);\n    formData.append('email_subject', emailMessage.subject);\n    formData.append('email_body', emailMessage.body);\n    \n    \/\/ Get hCaptcha response from the hidden textarea that hCaptcha creates\n    const hcaptchaTextarea = document.querySelector('textarea[name=\"h-captcha-response\"]');\n    if (hcaptchaTextarea && hcaptchaTextarea.value) {\n        formData.append('h-captcha-response', hcaptchaTextarea.value);\n        formData.append('g-recaptcha-response', hcaptchaTextarea.value);\n    }\n\n    fetch('\/wp-json\/contact-form-7\/v1\/contact-forms\/' + formId + '\/feedback', {\n        method: 'POST',\n        body: formData\n    })\n    .then(response => response.json())\n    .then(data => {\n        console.log('CF7 Response:', data);\n        if (data.status === 'mail_sent') {\n            window.location.href = 'https:\/\/myhairclinic.com\/thank-you-graft\/';\n        } else {\n            throw new Error(data.message || 'Submission failed');\n        }\n    })\n    .catch(error => {\n        console.error('Submission error:', error);\n        alert('Submission failed: ' + error.message + '\\n\\nPlease contact us directly at info@myhairclinic.com');\n        saveBtn.textContent = originalText;\n        saveBtn.disabled = false;\n        \n        \/\/ Reset hCaptcha by reloading the widget\n        const hcaptchaWidget = document.querySelector('.h-captcha');\n        if (hcaptchaWidget && hcaptchaWidget.children.length > 0) {\n            const widgetId = hcaptchaWidget.children[0].getAttribute('data-hcaptcha-widget-id');\n            if (widgetId && typeof hcaptcha !== 'undefined') {\n                try {\n                    hcaptcha.reset(widgetId);\n                } catch (e) {\n                    console.error('Error resetting hCaptcha:', e);\n                }\n            }\n        }\n    });\n}\n\ndocument.addEventListener('wpcf7mailsent', function(event) {\n    window.location.href = \"https:\/\/myhairclinic.com\/thank-you-graft\/\";\n}, false);\n<\/script>\n\n<\/body>\n<\/html>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>My Hair Clinic &#8211; Assessment Form MY HAIR CLINIC Advanced FUE Hair Transplantation &#8211; Assessment Form Patient Information Full Name * Email * Phone Number * Age * Preferred Location Select preferred locationDubaiOsloIslamabad Areas to Restore Select the areas you wish to restore (at least one required): Note: You can select one front area option [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-7621","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Graft Calculator - Dr Mazhar Hussain transplant<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/myhairclinic.com\/hair-transplant-graft-calculator\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Graft Calculator - Dr Mazhar Hussain transplant\" \/>\n<meta property=\"og:description\" content=\"My Hair Clinic &#8211; Assessment Form MY HAIR CLINIC Advanced FUE Hair Transplantation &#8211; Assessment Form Patient Information Full Name * Email * Phone Number * Age * Preferred Location Select preferred locationDubaiOsloIslamabad Areas to Restore Select the areas you wish to restore (at least one required): Note: You can select one front area option [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/myhairclinic.com\/hair-transplant-graft-calculator\/\" \/>\n<meta property=\"og:site_name\" content=\"Dr Mazhar Hussain transplant\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/My-Hair-Clinic-State-of-the-art-FUE-hair-transplantation-198448556914459\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-17T20:46:08+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@myhairclinic\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/myhairclinic.com\\\/hair-transplant-graft-calculator\\\/\",\"url\":\"https:\\\/\\\/myhairclinic.com\\\/hair-transplant-graft-calculator\\\/\",\"name\":\"Graft Calculator - Dr Mazhar Hussain transplant\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/#website\"},\"datePublished\":\"2025-09-03T10:16:42+00:00\",\"dateModified\":\"2025-10-17T20:46:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/myhairclinic.com\\\/hair-transplant-graft-calculator\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/myhairclinic.com\\\/hair-transplant-graft-calculator\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/myhairclinic.com\\\/hair-transplant-graft-calculator\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Graft Calculator\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/#website\",\"url\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/\",\"name\":\"Dr Mazhar Hussain transplant\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/#organization\",\"name\":\"My Hair Clinic\",\"url\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/15F-1024x6531-copy.png\",\"contentUrl\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/wp-content\\\/uploads\\\/2019\\\/02\\\/15F-1024x6531-copy.png\",\"width\":949,\"height\":564,\"caption\":\"My Hair Clinic\"},\"image\":{\"@id\":\"https:\\\/\\\/drmazharhussain.com\\\/ht\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/My-Hair-Clinic-State-of-the-art-FUE-hair-transplantation-198448556914459\\\/\",\"https:\\\/\\\/x.com\\\/myhairclinic\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Graft Calculator - Dr Mazhar Hussain transplant","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/myhairclinic.com\/hair-transplant-graft-calculator\/","og_locale":"en_US","og_type":"article","og_title":"Graft Calculator - Dr Mazhar Hussain transplant","og_description":"My Hair Clinic &#8211; Assessment Form MY HAIR CLINIC Advanced FUE Hair Transplantation &#8211; Assessment Form Patient Information Full Name * Email * Phone Number * Age * Preferred Location Select preferred locationDubaiOsloIslamabad Areas to Restore Select the areas you wish to restore (at least one required): Note: You can select one front area option [&hellip;]","og_url":"https:\/\/myhairclinic.com\/hair-transplant-graft-calculator\/","og_site_name":"Dr Mazhar Hussain transplant","article_publisher":"https:\/\/www.facebook.com\/My-Hair-Clinic-State-of-the-art-FUE-hair-transplantation-198448556914459\/","article_modified_time":"2025-10-17T20:46:08+00:00","twitter_card":"summary_large_image","twitter_site":"@myhairclinic","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/myhairclinic.com\/hair-transplant-graft-calculator\/","url":"https:\/\/myhairclinic.com\/hair-transplant-graft-calculator\/","name":"Graft Calculator - Dr Mazhar Hussain transplant","isPartOf":{"@id":"https:\/\/drmazharhussain.com\/ht\/#website"},"datePublished":"2025-09-03T10:16:42+00:00","dateModified":"2025-10-17T20:46:08+00:00","breadcrumb":{"@id":"https:\/\/myhairclinic.com\/hair-transplant-graft-calculator\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/myhairclinic.com\/hair-transplant-graft-calculator\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/myhairclinic.com\/hair-transplant-graft-calculator\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/drmazharhussain.com\/ht\/"},{"@type":"ListItem","position":2,"name":"Graft Calculator"}]},{"@type":"WebSite","@id":"https:\/\/drmazharhussain.com\/ht\/#website","url":"https:\/\/drmazharhussain.com\/ht\/","name":"Dr Mazhar Hussain transplant","description":"","publisher":{"@id":"https:\/\/drmazharhussain.com\/ht\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/drmazharhussain.com\/ht\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/drmazharhussain.com\/ht\/#organization","name":"My Hair Clinic","url":"https:\/\/drmazharhussain.com\/ht\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/drmazharhussain.com\/ht\/#\/schema\/logo\/image\/","url":"https:\/\/drmazharhussain.com\/ht\/wp-content\/uploads\/2019\/02\/15F-1024x6531-copy.png","contentUrl":"https:\/\/drmazharhussain.com\/ht\/wp-content\/uploads\/2019\/02\/15F-1024x6531-copy.png","width":949,"height":564,"caption":"My Hair Clinic"},"image":{"@id":"https:\/\/drmazharhussain.com\/ht\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/My-Hair-Clinic-State-of-the-art-FUE-hair-transplantation-198448556914459\/","https:\/\/x.com\/myhairclinic"]}]}},"_links":{"self":[{"href":"https:\/\/drmazharhussain.com\/ht\/wp-json\/wp\/v2\/pages\/7621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/drmazharhussain.com\/ht\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/drmazharhussain.com\/ht\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/drmazharhussain.com\/ht\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/drmazharhussain.com\/ht\/wp-json\/wp\/v2\/comments?post=7621"}],"version-history":[{"count":114,"href":"https:\/\/drmazharhussain.com\/ht\/wp-json\/wp\/v2\/pages\/7621\/revisions"}],"predecessor-version":[{"id":8362,"href":"https:\/\/drmazharhussain.com\/ht\/wp-json\/wp\/v2\/pages\/7621\/revisions\/8362"}],"wp:attachment":[{"href":"https:\/\/drmazharhussain.com\/ht\/wp-json\/wp\/v2\/media?parent=7621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}