{"id":26,"date":"2026-01-27T06:15:39","date_gmt":"2026-01-27T06:15:39","guid":{"rendered":"https:\/\/npmstudio.io\/?page_id=26"},"modified":"2026-01-27T06:15:39","modified_gmt":"2026-01-27T06:15:39","slug":"sms-consent-email-consent","status":"publish","type":"page","link":"https:\/\/npmstudio.io\/?page_id=26","title":{"rendered":"SMS Consent | Email Consent"},"content":{"rendered":"\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\" style=\"padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--50)\">\n\n\t\n\t<h1 class=\"wp-block-heading\">Communication Preferences<\/h1>\n\t\n\n\t\n\t<p class=\"wp-block-paragraph\">Choose how you\u2019d like to hear from NPM. You can update these preferences anytime.<\/p>\n\t\n\n\t\n\t<div style=\"height:24px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\t\n\n\t\n\t<div class=\"wp-block-group has-global-padding is-layout-constrained wp-container-core-group-is-layout-cc0b9354 wp-block-group-is-layout-constrained\" style=\"border-radius:12px;border-width:1px;padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)\">\n\n\t\t\n\t\t<p class=\"wp-block-paragraph\"><strong>Email consent<\/strong><\/p>\n\t\t\n\n\t\t\n\t\t<form id=\"npm-consent-form\" action=\"#\" method=\"post\" style=\"margin:0\">\n\t\t\t<div style=\"display:flex;flex-direction:column;gap:16px;max-width:720px\">\n\n\t\t\t\t<div style=\"display:flex;flex-direction:column;gap:8px\">\n\t\t\t\t\t<label for=\"email\" style=\"font-weight:600\">Email address<\/label>\n\t\t\t\t\t<input id=\"email\" name=\"email\" type=\"email\" placeholder=\"you@example.com\" autocomplete=\"email\" required\n\t\t\t\t\t\tstyle=\"width:100%;padding:12px 14px;border:1px solid currentColor;border-radius:10px;background:transparent\" \/>\n\t\t\t\t<\/div>\n\n\t\t\t\t<label style=\"display:flex;gap:12px;align-items:flex-start;cursor:pointer\">\n\t\t\t\t\t<input id=\"consent_email\" name=\"consent_email\" type=\"checkbox\" required style=\"margin-top:3px\" \/>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<strong>I agree to receive emails<\/strong> from NPM, including product updates, important notices, and service-related messages.\n\t\t\t\t\t<\/span>\n\t\t\t\t<\/label>\n\n\t\t\t\t<hr style=\"width:100%;opacity:.2\" \/>\n\n\t\t\t\t<p style=\"margin:0\"><strong>SMS consent<\/strong><\/p>\n\n\t\t\t\t<div style=\"display:flex;flex-direction:column;gap:8px\">\n\t\t\t\t\t<label for=\"phone\" style=\"font-weight:600\">Mobile number<\/label>\n\t\t\t\t\t<input id=\"phone\" name=\"phone\" type=\"tel\" placeholder=\"+1 (555) 555-5555\" autocomplete=\"tel\"\n\t\t\t\t\t\tstyle=\"width:100%;padding:12px 14px;border:1px solid currentColor;border-radius:10px;background:transparent\" \/>\n\t\t\t\t\t<p style=\"margin:0;opacity:.8;font-size:.95em\">Optional \u2014 only needed if you want SMS messages.<\/p>\n\t\t\t\t<\/div>\n\n\t\t\t\t<label style=\"display:flex;gap:12px;align-items:flex-start;cursor:pointer\">\n\t\t\t\t\t<input id=\"consent_sms\" name=\"consent_sms\" type=\"checkbox\" \/>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<strong>I agree to receive SMS messages<\/strong> from NPM at the number provided.\n\t\t\t\t\t\tMessage and data rates may apply. Message frequency varies. Reply STOP to opt out.\n\t\t\t\t\t<\/span>\n\t\t\t\t<\/label>\n\n\t\t\t\t<p style=\"margin:0;opacity:.8;font-size:.95em\">\n\t\t\t\t\tBy submitting, you confirm you are the account holder (or have permission to use these contact details).\n\t\t\t\t\tSee our <a href=\"#\" rel=\"nofollow\">Privacy Policy<\/a> for more information.\n\t\t\t\t<\/p>\n\n\t\t\t\t<div style=\"display:flex;gap:12px;flex-wrap:wrap;margin-top:8px\">\n\t\t\t\t\t<button type=\"submit\" style=\"padding:12px 16px;border-radius:10px;border:1px solid currentColor;background:currentColor;color:inherit;cursor:pointer\">\n\t\t\t\t\t\tSave preferences\n\t\t\t\t\t<\/button>\n\t\t\t\t\t<button type=\"button\" id=\"npm-reset\" style=\"padding:12px 16px;border-radius:10px;border:1px solid currentColor;background:transparent;cursor:pointer\">\n\t\t\t\t\t\tClear\n\t\t\t\t\t<\/button>\n\t\t\t\t<\/div>\n\n\t\t\t\t<p id=\"npm-status\" style=\"margin:0;display:none\"><\/p>\n\t\t\t<\/div>\n\t\t<\/form>\n\n\t\t<script>\n\t\t\t(function () {\n\t\t\t\tconst form = document.getElementById('npm-consent-form');\n\t\t\t\tconst resetBtn = document.getElementById('npm-reset');\n\t\t\t\tconst status = document.getElementById('npm-status');\n\n\t\t\t\tfunction setStatus(msg, ok) {\n\t\t\t\t\tstatus.style.display = 'block';\n\t\t\t\t\tstatus.textContent = msg;\n\t\t\t\t\tstatus.style.opacity = '1';\n\t\t\t\t\tstatus.style.fontWeight = '600';\n\t\t\t\t\tstatus.style.marginTop = '8px';\n\t\t\t\t\tstatus.style.color = ok ? 'inherit' : 'inherit';\n\t\t\t\t}\n\n\t\t\t\tresetBtn.addEventListener('click', function () {\n\t\t\t\t\tform.reset();\n\t\t\t\t\tstatus.style.display = 'none';\n\t\t\t\t});\n\n\t\t\t\tform.addEventListener('submit', function (e) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tconst email = (document.getElementById('email').value || '').trim();\n\t\t\t\t\tconst phone = (document.getElementById('phone').value || '').trim();\n\t\t\t\t\tconst consentEmail = document.getElementById('consent_email').checked;\n\t\t\t\t\tconst consentSms = document.getElementById('consent_sms').checked;\n\n\t\t\t\t\tif (!consentEmail) {\n\t\t\t\t\t\tsetStatus('Please confirm email consent to continue.', false);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (consentSms && !phone) {\n\t\t\t\t\t\tsetStatus('Please enter a mobile number to receive SMS messages.', false);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t\/\/ TODO: Connect this form to your backend \/ CRM (e.g., Mailchimp, Klaviyo, HubSpot, custom API).\n\t\t\t\t\t\/\/ For now, show a confirmation message.\n\t\t\t\t\tconst parts = [];\n\t\t\t\t\tparts.push(`Email: ${email} (consented)`);\n\t\t\t\t\tparts.push(consentSms ? `SMS: ${phone} (consented)` : 'SMS: not consented');\n\n\t\t\t\t\tsetStatus('Saved. ' + parts.join(' \u2022 '), true);\n\t\t\t\t});\n\t\t\t})();\n\t\t<\/script>\n\t\t\n\n\t<\/div>\n\t\n\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Communication Preferences Choose how you\u2019d like to hear from NPM. You can update these preferences anytime. Email consent Email address I agree to receive emails from NPM, including product updates, important notices, and service-related messages. SMS consent Mobile number Optional \u2014 only needed if you want SMS messages. I agree to receive SMS messages from [&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-26","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/npmstudio.io\/index.php?rest_route=\/wp\/v2\/pages\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/npmstudio.io\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/npmstudio.io\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/npmstudio.io\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/npmstudio.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26"}],"version-history":[{"count":1,"href":"https:\/\/npmstudio.io\/index.php?rest_route=\/wp\/v2\/pages\/26\/revisions"}],"predecessor-version":[{"id":27,"href":"https:\/\/npmstudio.io\/index.php?rest_route=\/wp\/v2\/pages\/26\/revisions\/27"}],"wp:attachment":[{"href":"https:\/\/npmstudio.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}