{"id":3,"date":"2025-05-05T20:20:04","date_gmt":"2025-05-05T19:20:04","guid":{"rendered":"https:\/\/webtools.creatif.digital\/ideal-mortgage-advice\/calculator-embed\/"},"modified":"2025-05-05T20:21:49","modified_gmt":"2025-05-05T19:21:49","slug":"calculator-embed","status":"publish","type":"page","link":"https:\/\/webtools.creatif.digital\/ideal-mortgage-advice\/","title":{"rendered":"Calculator Embed"},"content":{"rendered":"<div class=\"et_pb_section_0 et_pb_section et_section_regular et_flex_section\">\n<div class=\"et_pb_row_0 et_pb_row et_flex_row\">\n<div class=\"et_pb_column_0 et_pb_column et-last-child et_flex_column et_pb_css_mix_blend_mode_passthrough et_flex_column_24_24 et_flex_column_24_24_tablet et_flex_column_24_24_phone\">\n<div class=\"et_pb_text_0 et_pb_text et_pb_bg_layout_light et_pb_module et_flex_module\"><div class=\"et_pb_text_inner\"><div class=\"ukmc-wrapper\"><div class=\"ukmc-container\">\n        <div class=\"ukmc-columns-wrapper \">\n        <div class=\"ukmc-flex\">\n            <div class=\"ukmc-inputs\">\n                                    <h2 class=\"ukmc-inner-title\">Try our handy mortgage calculator:<\/h2>\n                \n                <label>Property Price<\/label>\n                <input type=\"number\" id=\"propertyPriceNumber\" value=\"350000\">\n                <input type=\"range\" id=\"propertyPriceRange\" min=\"50000\" max=\"1000000\" step=\"5000\" value=\"350000\">\n                <small>Enter the property price.<\/small>\n\n                <label>Deposit Amount<\/label>\n                <input type=\"number\" id=\"depositNumber\" value=\"50000\">\n                <input type=\"range\" id=\"depositRange\" min=\"0\" max=\"500000\" step=\"1000\" value=\"50000\">\n                <small>Enter your deposit amount.<\/small>\n\n                <label>Mortgage Term (years)<\/label>\n                <input type=\"number\" id=\"termNumber\" value=\"30\">\n                <input type=\"range\" id=\"termRange\" min=\"5\" max=\"40\" step=\"1\" value=\"30\">\n                <small>Enter the mortgage term.<\/small>\n\n                <label>Interest Rate (%)<\/label>\n                <input type=\"number\" id=\"interestRateNumber\" value=\"5.25\" step=\"0.01\">\n                <input type=\"range\" id=\"interestRateRange\" min=\"0\" max=\"15\" step=\"0.01\" value=\"5.25\">\n                <small>Enter estimated interest rate.<\/small>\n\n                                    <label>Property Location<\/label>\n                    <select id=\"location\">\n                        <option value=\"england\">England<\/option>\n                        <option value=\"wales\">Wales<\/option>\n                        <option value=\"scotland\">Scotland<\/option>\n                        <option value=\"northern-ireland\">Northern Ireland<\/option>\n                    <\/select>\n\n                    <label>Buyer Type<\/label>\n                    <select id=\"buyerType\">\n                        <option value=\"first\">First-time Buyer<\/option>\n                        <option value=\"standard\">Home Mover<\/option>\n                        <option value=\"additional\">Additional Property \/ Second Home<\/option>\n                    <\/select>\n                            <\/div>\n\n            <div class=\"ukmc-results\">\n                <h3 class=\"ukmc-monthly-header\">Your Monthly Payment<\/h3>\n                <p class=\"ukmc-monthly-amount\" id=\"monthlyPayment\">-<\/p>\n\n                <h4>Total you'll repay over the term:<\/h4>\n                <p id=\"totalRepay\">-<\/p>\n                <small class=\"ukmc-subtext\">This is made up of your total loan amount, plus your interest paid, shown below.<\/small>\n\n                <h4>Loan Amount:<\/h4>\n                <p id=\"loanAmount\">-<\/p>\n\n                <h4>Total Interest Paid:<\/h4>\n                <p id=\"totalInterest\">-<\/p>\n\n                                    <h4>Stamp Duty:<\/h4>\n                    <p id=\"stampDuty\">-<\/p>\n                \n                                    <h3 class=\"ukmc-contact-heading\">Want to chat?<\/h3>\n                    <a href=\"https:\/\/idealmortgageadvice.co.uk\/contact\" class=\"ukmc-button\" \n                    target=\"_top\" rel=\"noopener noreferrer\">\n                        Speak to Adviser                    <\/a>\n                \n                <p class=\"ukmc-bottom-disclaimer\">\n                    Figures are estimates only and do not constitute financial advice.                <\/p>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div><\/div>\n<script>\n(function() {\n\tconst isCmsEditor = true;\n\tconst allowedDomains = [\"webtools.creatif.digital\",\"staging4.creatif.digital\",\"idealmortgageadvice.co.uk\"];\n\n\tfunction getParentDomain() {\n\t\ttry {\n\t\t\tconst referrer = document.referrer;\n\t\t\tif (!referrer) return '';\n\t\t\treturn new URL(referrer).hostname;\n\t\t} catch (e) {\n\t\t\treturn '';\n\t\t}\n\t}\n\n\tfunction isDomainAllowed(domain) {\n\t\tif (!domain) return false;\n\t\treturn allowedDomains.some(function(allowed) {\n\t\t\tif (!allowed) return false;\n\t\t\tif (allowed.startsWith('*.')) {\n\t\t\t\tconst baseDomain = allowed.slice(2);\n\t\t\t\treturn domain.endsWith('.' + baseDomain) || domain === baseDomain;\n\t\t\t}\n\t\t\treturn domain === allowed;\n\t\t});\n\t}\n\n\tfunction enforceLicense() {\n\t\tif (isCmsEditor) {\n\t\t\tdocument.body.classList.add('ukmc-licensed');\n\t\t\treturn;\n\t\t}\n\t\tif (window.self !== window.top) {\n\t\t\tconst parentDomain = getParentDomain();\n\t\t\tif (!parentDomain || !isDomainAllowed(parentDomain)) {\n\t\t\t\tdocument.body.innerHTML = `\n\t\t\t\t\t<div style=\"max-width:600px;margin:40px auto;padding:30px;border:1px solid #e0b4b4;background:#fff0f0;color:#b30000;font-family:sans-serif;border-radius:8px;text-align:center;\">\n\t\t\t\t\t\t<strong>This mortgage calculator is not licensed for this domain.<\/strong><br>\n\t\t\t\t\t\tPlease contact <a href='https:\/\/creatif.digital' target='_blank' rel='noopener noreferrer' style='color:#b30000;text-decoration:underline;'>Creatif Digital<\/a> to request access.\n\t\t\t\t\t<\/div>`;\n\t\t\t\tdocument.body.classList.add('ukmc-unauthorized');\n\t\t\t\tdocument.body.style.margin = '0';\n\t\t\t\tdocument.body.style.padding = '40px 20px';\n\t\t\t\tdocument.body.style.background = '#ffffff';\n\t\t\t\treportUnauthorizedAccess(parentDomain || 'unknown');\n\t\t\t} else {\n\t\t\t\tdocument.body.classList.add('ukmc-licensed');\n\t\t\t}\n\t\t} else {\n\t\t\tdocument.body.classList.add('ukmc-licensed');\n\t\t}\n\t}\n\n\tfunction reportUnauthorizedAccess(domain) {\n\t\tif (!domain) return;\n\t\tfetch('https:\/\/webtools.creatif.digital\/wp-json\/ukmc\/v1\/report-unauthorized', {\n\t\t\tmethod: 'POST',\n\t\t\theaders: { 'Content-Type': 'application\/json' },\n\t\t\tbody: JSON.stringify({ domain, iframe: window.location.href })\n\t\t}).catch(() => {});\n\t}\n\n\tfunction reportAnalyticsHit() {\n\t\tif (isCmsEditor) return;\n\t\ttry {\n\t\t\tconst domain = getParentDomain() || 'unknown';\n\t\t\tfetch('https:\/\/webtools.creatif.digital\/wp-json\/ukmc\/v1\/analytics-hit', {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: { 'Content-Type': 'application\/json' },\n\t\t\t\tbody: JSON.stringify({ domain, iframe: window.location.href })\n\t\t\t}).catch(() => {});\n\t\t} catch (e) {}\n\t}\n\n\tfunction postIframeHeight() {\n\t\tconst height = Math.max(\n\t\t\tdocument.documentElement.scrollHeight,\n\t\t\tdocument.body.scrollHeight,\n\t\t\tdocument.documentElement.offsetHeight,\n\t\t\tdocument.body.offsetHeight,\n\t\t\tdocument.documentElement.clientHeight\n\t\t) + 20;\n\t\tif (window.parent && window.parent.postMessage) {\n\t\t\twindow.parent.postMessage({ ukmcHeight: height }, '*');\n\t\t}\n\t}\n\n\tenforceLicense();\n\tdocument.addEventListener('DOMContentLoaded', () => {\n\t\treportAnalyticsHit();\n\t\tpostIframeHeight();\n\t\tsetTimeout(postIframeHeight, 500);\n\t});\n\n\twindow.addEventListener('resize', postIframeHeight);\n\tif ('ResizeObserver' in window && document.body) {\n\t\tconst observer = new ResizeObserver(postIframeHeight);\n\t\tobserver.observe(document.body);\n\t} else {\n\t\tsetInterval(postIframeHeight, 1000);\n\t}\n})();\n<\/script>\n\n<\/div><\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-embed.php","meta":{"footnotes":""},"class_list":["post-3","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/webtools.creatif.digital\/ideal-mortgage-advice\/wp-json\/wp\/v2\/pages\/3","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webtools.creatif.digital\/ideal-mortgage-advice\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/webtools.creatif.digital\/ideal-mortgage-advice\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/webtools.creatif.digital\/ideal-mortgage-advice\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webtools.creatif.digital\/ideal-mortgage-advice\/wp-json\/wp\/v2\/comments?post=3"}],"version-history":[{"count":2,"href":"https:\/\/webtools.creatif.digital\/ideal-mortgage-advice\/wp-json\/wp\/v2\/pages\/3\/revisions"}],"predecessor-version":[{"id":8,"href":"https:\/\/webtools.creatif.digital\/ideal-mortgage-advice\/wp-json\/wp\/v2\/pages\/3\/revisions\/8"}],"wp:attachment":[{"href":"https:\/\/webtools.creatif.digital\/ideal-mortgage-advice\/wp-json\/wp\/v2\/media?parent=3"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}