CINXE.COM
HubSpot - Privacy Center
<!DOCTYPE html> <html lang='en'> <head> <meta content='width=device-width, initial-scale=1.0' name='viewport'> <meta content='noindex' name='robots'> <title>HubSpot - Privacy Center</title> <link rel="icon" type="image/x-icon" href="/assets/favicon2024-b6e4fcc409a301776e7c31e5a2f9e377e274de956ad80f49a276e4d6f5425b3d.ico" /> <link rel="stylesheet" href="/assets/application-3fb6b0ab4adc75ee6e33ebe1f2309c8989250559740a9eea9aeed4d58c7f78db.css" media="all" data-turbolinks-track="reload" /> <script src="/assets/application-1a6bbcca200610e8a673e860290bcdc202458f826206cf0e9be05d12ff5adad9.js" data-turbolinks-track="reload"></script> <meta name="csrf-param" content="authenticity_token" /> <meta name="csrf-token" content="faOWql0x5ozj9Rx1uD8Zr-nPIFpseJKcsGeOA4GOpe6n9Wc1HR7tW6Ntg4EcI4AM8y2Fnp0TgzAYQE6ADSnd3w" /> </head> <body> <main class='align-middle' role='main'> <script> document.querySelector('body').id ='privacy-intake-body'; </script> <div class='container' id='privacy-intake-outer-container'> <div hidden id='form-alerting-check-point'></div> <div id='privacy-intake-inner-container'> <div class='hide' id='add-me'> <h1> Thank you </h1> <p> Your request has been submitted and you will receive an email shortly. </p> </div> <form id="privacy-intake-form" novalidate="novalidate" action="/privacy?url=%2Fprivacy%3F_gl%3D1%2Az95wmv%2A_ga%2AMTYyMTg2ODcxMi4xNzE1MTkxODIz%2A_ga_LXTM6CQ0XK%2AMTcxNTM2OTg0MS45LjEuMTcxNTM3MTk2OS41OS4wLjA." accept-charset="UTF-8" data-remote="true" method="post"><input type="hidden" name="authenticity_token" value="08i4BdH3SfARjFnfvhd9HiD1gHlepvbuAJ_j0wOeWdVgOI5-4P1AQIPZkGlRluFM8i78DgHSP4TXC3nkJN7xsQ" autocomplete="off" /> <div class='remove-me'> <div class='row privacy-intake-header'> <div class='privacy-intake-header-title-container col-xs-12 col-lg-12'> <img alt="HubSpot logo" class="privacy-intake-logo" src="https://assets-production.datagrail.io/hubspot.png?versionId=JPap.7jpGWVEDj2SytubyznKsy1ZS0SL" /> </div> <div class='geo-selector-row row col-lg-12'> <div class='col-xs-12 col-lg-5'> <div class='geo-selector-wrap mb-3'> <button class='geo-selector-dropdown' id='geo-selector-dropdown' style='border: none; background: none;' title='Location selector, click to expand/collapse'> <img class="mui-language" src="/assets/mui-language-8433cc95b1b31561d59644c3216c4f5f147ce60cc40280bf71099db3b83dd4f8.svg" /> Singapore, English <img class="mui-expand-more" aria-hidden="true" src="/assets/mui-expand-more-364821e0148250134df45baca49395eafb86d1a33ea406fb87d13e9549732c99.svg" /> </button> </div> <div class='geo-selector-content hide'> <div class='form-group'> <label for="reported_country">Country of residence</label> <select class="form-control" id="reported_country" required="required" autocomplete="disabled" name="reported_country"><option value="">Select a country</option> <option value="AF">Afghanistan</option> <option value="AX">Åland Islands</option> <option value="AL">Albania</option> <option value="DZ">Algeria</option> <option value="AS">American Samoa</option> <option value="AD">Andorra</option> <option value="AO">Angola</option> <option value="AI">Anguilla</option> <option value="AQ">Antarctica</option> <option value="AG">Antigua and Barbuda</option> <option value="AR">Argentina</option> <option value="AM">Armenia</option> <option value="AW">Aruba</option> <option value="AU">Australia</option> <option value="AT">Austria</option> <option value="AZ">Azerbaijan</option> <option value="BS">Bahamas</option> <option value="BH">Bahrain</option> <option value="BD">Bangladesh</option> <option value="BB">Barbados</option> <option value="BY">Belarus</option> <option value="BE">Belgium</option> <option value="BZ">Belize</option> <option value="BJ">Benin</option> <option value="BM">Bermuda</option> <option value="BT">Bhutan</option> <option value="BO">Bolivia</option> <option value="BQ">Bonaire, Sint Eustatius and Saba</option> <option value="BA">Bosnia and Herzegovina</option> <option value="BW">Botswana</option> <option value="BV">Bouvet Island</option> <option value="BR">Brazil</option> <option value="IO">British Indian Ocean Territory</option> <option value="BN">Brunei Darussalam</option> <option value="BG">Bulgaria</option> <option value="BF">Burkina Faso</option> <option value="BI">Burundi</option> <option value="CV">Cabo Verde</option> <option value="KH">Cambodia</option> <option value="CM">Cameroon</option> <option value="CA">Canada</option> <option value="KY">Cayman Islands</option> <option value="CF">Central African Republic</option> <option value="TD">Chad</option> <option value="CL">Chile</option> <option value="CN">China</option> <option value="CX">Christmas Island</option> <option value="CC">Cocos (Keeling) Islands</option> <option value="CO">Colombia</option> <option value="KM">Comoros</option> <option value="CG">Congo</option> <option value="CD">Congo, The Democratic Republic of the</option> <option value="CK">Cook Islands</option> <option value="CR">Costa Rica</option> <option value="CI">Côte d'Ivoire</option> <option value="HR">Croatia</option> <option value="CU">Cuba</option> <option value="CW">Curaçao</option> <option value="CY">Cyprus</option> <option value="CZ">Czechia</option> <option value="DK">Denmark</option> <option value="DJ">Djibouti</option> <option value="DM">Dominica</option> <option value="DO">Dominican Republic</option> <option value="EC">Ecuador</option> <option value="EG">Egypt</option> <option value="SV">El Salvador</option> <option value="GQ">Equatorial Guinea</option> <option value="ER">Eritrea</option> <option value="EE">Estonia</option> <option value="SZ">Eswatini</option> <option value="ET">Ethiopia</option> <option value="FK">Falkland Islands (Malvinas)</option> <option value="FO">Faroe Islands</option> <option value="FJ">Fiji</option> <option value="FI">Finland</option> <option value="FR">France</option> <option value="GF">French Guiana</option> <option value="PF">French Polynesia</option> <option value="TF">French Southern Territories</option> <option value="GA">Gabon</option> <option value="GM">Gambia</option> <option value="GE">Georgia</option> <option value="DE">Germany</option> <option value="GH">Ghana</option> <option value="GI">Gibraltar</option> <option value="GR">Greece</option> <option value="GL">Greenland</option> <option value="GD">Grenada</option> <option value="GP">Guadeloupe</option> <option value="GU">Guam</option> <option value="GT">Guatemala</option> <option value="GG">Guernsey</option> <option value="GN">Guinea</option> <option value="GW">Guinea-Bissau</option> <option value="GY">Guyana</option> <option value="HT">Haiti</option> <option value="HM">Heard Island and McDonald Islands</option> <option value="VA">Holy See (Vatican City State)</option> <option value="HN">Honduras</option> <option value="HK">Hong Kong</option> <option value="HU">Hungary</option> <option value="IS">Iceland</option> <option value="IN">India</option> <option value="ID">Indonesia</option> <option value="IR">Iran, Islamic Republic of</option> <option value="IQ">Iraq</option> <option value="IE">Ireland</option> <option value="IM">Isle of Man</option> <option value="IL">Israel</option> <option value="IT">Italy</option> <option value="JM">Jamaica</option> <option value="JP">Japan</option> <option value="JE">Jersey</option> <option value="JO">Jordan</option> <option value="KZ">Kazakhstan</option> <option value="KE">Kenya</option> <option value="KI">Kiribati</option> <option value="KP">Korea, Democratic People's Republic of</option> <option value="KR">Korea, Republic of</option> <option value="KW">Kuwait</option> <option value="KG">Kyrgyzstan</option> <option value="LA">Lao People's Democratic Republic</option> <option value="LV">Latvia</option> <option value="LB">Lebanon</option> <option value="LS">Lesotho</option> <option value="LR">Liberia</option> <option value="LY">Libya</option> <option value="LI">Liechtenstein</option> <option value="LT">Lithuania</option> <option value="LU">Luxembourg</option> <option value="MO">Macao</option> <option value="MG">Madagascar</option> <option value="MW">Malawi</option> <option value="MY">Malaysia</option> <option value="MV">Maldives</option> <option value="ML">Mali</option> <option value="MT">Malta</option> <option value="MH">Marshall Islands</option> <option value="MQ">Martinique</option> <option value="MR">Mauritania</option> <option value="MU">Mauritius</option> <option value="YT">Mayotte</option> <option value="MX">Mexico</option> <option value="FM">Micronesia, Federated States of</option> <option value="MD">Moldova</option> <option value="MC">Monaco</option> <option value="MN">Mongolia</option> <option value="ME">Montenegro</option> <option value="MS">Montserrat</option> <option value="MA">Morocco</option> <option value="MZ">Mozambique</option> <option value="MM">Myanmar</option> <option value="NA">Namibia</option> <option value="NR">Nauru</option> <option value="NP">Nepal</option> <option value="NL">Netherlands</option> <option value="NC">New Caledonia</option> <option value="NZ">New Zealand</option> <option value="NI">Nicaragua</option> <option value="NE">Niger</option> <option value="NG">Nigeria</option> <option value="NU">Niue</option> <option value="NF">Norfolk Island</option> <option value="MK">North Macedonia</option> <option value="MP">Northern Mariana Islands</option> <option value="NO">Norway</option> <option value="OM">Oman</option> <option value="PK">Pakistan</option> <option value="PW">Palau</option> <option value="PS">Palestine, State of</option> <option value="PA">Panama</option> <option value="PG">Papua New Guinea</option> <option value="PY">Paraguay</option> <option value="PE">Peru</option> <option value="PH">Philippines</option> <option value="PN">Pitcairn</option> <option value="PL">Poland</option> <option value="PT">Portugal</option> <option value="PR">Puerto Rico</option> <option value="QA">Qatar</option> <option value="RE">Réunion</option> <option value="RO">Romania</option> <option value="RU">Russian Federation</option> <option value="RW">Rwanda</option> <option value="BL">Saint Barthélemy</option> <option value="SH">Saint Helena, Ascension and Tristan da Cunha</option> <option value="KN">Saint Kitts and Nevis</option> <option value="LC">Saint Lucia</option> <option value="MF">Saint Martin (French part)</option> <option value="PM">Saint Pierre and Miquelon</option> <option value="VC">Saint Vincent and the Grenadines</option> <option value="WS">Samoa</option> <option value="SM">San Marino</option> <option value="ST">Sao Tome and Principe</option> <option value="SA">Saudi Arabia</option> <option value="SN">Senegal</option> <option value="RS">Serbia</option> <option value="SC">Seychelles</option> <option value="SL">Sierra Leone</option> <option selected="selected" value="SG">Singapore</option> <option value="SX">Sint Maarten (Dutch part)</option> <option value="SK">Slovakia</option> <option value="SI">Slovenia</option> <option value="SB">Solomon Islands</option> <option value="SO">Somalia</option> <option value="ZA">South Africa</option> <option value="GS">South Georgia and the South Sandwich Islands</option> <option value="SS">South Sudan</option> <option value="ES">Spain</option> <option value="LK">Sri Lanka</option> <option value="SD">Sudan</option> <option value="SR">Suriname</option> <option value="SJ">Svalbard and Jan Mayen</option> <option value="SE">Sweden</option> <option value="CH">Switzerland</option> <option value="SY">Syrian Arab Republic</option> <option value="TW">Taiwan</option> <option value="TJ">Tajikistan</option> <option value="TZ">Tanzania</option> <option value="TH">Thailand</option> <option value="TL">Timor-Leste</option> <option value="TG">Togo</option> <option value="TK">Tokelau</option> <option value="TO">Tonga</option> <option value="TT">Trinidad and Tobago</option> <option value="TN">Tunisia</option> <option value="TR">Turkey</option> <option value="TM">Turkmenistan</option> <option value="TC">Turks and Caicos Islands</option> <option value="TV">Tuvalu</option> <option value="UG">Uganda</option> <option value="UA">Ukraine</option> <option value="AE">United Arab Emirates</option> <option value="GB">United Kingdom</option> <option value="UM">United States Minor Outlying Islands</option> <option value="US">United States</option> <option value="UY">Uruguay</option> <option value="UZ">Uzbekistan</option> <option value="VU">Vanuatu</option> <option value="VE">Venezuela</option> <option value="VN">Vietnam</option> <option value="VG">Virgin Islands, British</option> <option value="VI">Virgin Islands, U.S.</option> <option value="WF">Wallis and Futuna</option> <option value="EH">Western Sahara</option> <option value="YE">Yemen</option> <option value="ZM">Zambia</option> <option value="ZW">Zimbabwe</option></select> <div class='privacy-intake-error-message'> Please choose a country </div> </div> <div class='form-group'> <div class='form-group'> <label hidden="hidden" for="privacy-intake-state-select">Region of residence</label> <select name="privacy-intake-state-select" id="privacy-intake-state-select" class="form-control" hidden="hidden" autocomplete="disabled"><option value="">Select a state</option><option value="SG-01">Central Singapore</option> <option value="01">Central Singapore</option> <option value="SG-02">North East</option> <option value="02">North East</option> <option value="SG-03">North West</option> <option value="03">North West</option> <option value="SG-04">South East</option> <option value="04">South East</option> <option value="SG-05">South West</option> <option value="05">South West</option></select> </div> </div> <div class='form-group'> <div class='translations'> <div class='d-flex justify-content-between pb-2 line'> <label for='translations-select'> Translation </label> <img class="mui-language" src="/assets/mui-language-8433cc95b1b31561d59644c3216c4f5f147ce60cc40280bf71099db3b83dd4f8.svg" /> </div> <div> <div class='form-group'> <select name="translations" id="translations-select" class="form-control"><option value="" label=" "></option><option value="es-MX">Español (mexicano)</option> <option selected="selected" value="en">English</option> <option value="pt-BR">Portugues (brasil)</option> <option value="fr">Français</option> <option value="de">Deutsch</option> <option value="ja">日本語</option></select> </div> </div> </div> <script> document.getElementById('translations-select').addEventListener('change', function(event){ var code = event.target.value; var localeParam = "locale=" + (code || '').toString(); if(code){ if(!window.location.search) { return window.location.search = localeParam } else { var params = window.location.search.substring(1).split('&'); var match = false; var reload = true; for(var i = 0; i < params.length; i++) { if(params[i].match(/^locale=/g)) { if(params[i].match("=" + code.toString() + "$")) { reload = false; return } params[i] = localeParam; match = true; } } if(!reload) { return } if(!match) { params.push(localeParam)} if (typeof(reloadPage) !== 'undefined' && typeof(reloadPage) === 'function') { reloadPage(params.join('&')); } else { window.location.search = params.join('&'); } } } }) </script> </div> </div> </div> </div> <script> const dropdownToggle = document.querySelector('.geo-selector-dropdown'); const selectorContent = document.querySelector('.geo-selector-content'); dropdownToggle.addEventListener('click', function(e) { e.preventDefault(); selectorContent.classList.toggle('hide'); }); </script> <div class='privacy-intake-header-title-container col-xs-12 col-lg-6'> <h1 class='typography typography--h1'> Privacy Request Form </h1> </div> <div class='privacy-intake-header-internal'> <div class='col-xs-12 col-lg-6'> <p class='mb-3'> You can use this form to submit a request regarding your own personal information that is controlled by HubSpot. Please complete this form and we will respond as soon as possible.<p>For more details and information about how we use and protect your personal information, please visit our <a href="https://legal.hubspot.com/privacy-policy">Privacy Policy</a>.</p><p>Thank you!</p> </p> </div> </div> </div> <hr> <div class='privacy-intake-details'> <div class='row'> <div class='col-xs-12 col-lg-5'> <h2 class='typography typography--h2'> Data Subject Details </h2> <p> <p>We need your name and email address in order to process your request and safeguard your data. We will use the data gathered here only to process your request and for record-keeping as required by law.</p> <p>You will receive an email to verify your address. Follow the instructions you will receive to complete processing of your request.</p> </p> </div> </div> <div class='row'> <div class='col-xs-12 col-lg-4'> <div class='form-group'> <label for="first_name">First name</label> <input type="text" name="first_name" id="first_name" class="form-control" required="required" /> <div class='privacy-intake-error-message'> Please enter your first name </div> </div> <div class='form-group'> <label for="last_name">Last name</label> <input type="text" name="last_name" id="last_name" class="form-control" required="required" /> <div class='privacy-intake-error-message'> Please enter your last name </div> </div> <div class='form-group email'> <label for="email">Email address</label> <input type="text" name="email" id="email" class="form-control" required="required" /> <div class='privacy-intake-error-message' id='email-error-message'> Please enter a valid email </div> </div> </div> </div> </div> <hr> <div class='privacy-intake-request-type'> <div class='row'> <div class='col-xs-12 col-lg-5' id='privacy-intake-kinds-container'> <h2 class='typography typography--h2' id='privacy-intake-kinds-header'> Type of Request </h2> <div aria-labelledby='privacy-intake-kinds-header' id='privacy-intake-kinds' role='radiogroup'> <div class='form-check'> <input type="radio" name="kind" id="kind_access" value="access" class="form-check-input" required="required" aria-label="Download" aria-describedby="description-for-Download" /> <label class="form-check-label" for="kind_access">Download</label> <p id='description-for-Download'> We will provide a complete report of your personal data across our systems </p> </div> <div class='form-check'> <input type="radio" name="kind" id="kind_data_portability" value="data_portability" class="form-check-input" required="required" aria-label="Transfer" aria-describedby="description-for-Transfer" /> <label class="form-check-label" for="kind_data_portability">Transfer</label> <p id='description-for-Transfer'> Package up your data and send it to a desired recipient </p> </div> <div class='form-check'> <input type="radio" name="kind" id="kind_deletion" value="deletion" class="form-check-input" required="required" aria-label="Delete" aria-describedby="description-for-Delete" /> <label class="form-check-label" for="kind_deletion">Delete</label> <p id='description-for-Delete'> Delete your personal data found in our systems </p> </div> <div class='form-check'> <input type="radio" name="kind" id="kind_opt_out" value="opt_out" class="form-check-input" disabled="disabled" required="required" aria-label="Opt Out" aria-describedby="description-for-Opt Out" /> <label class="form-check-label" for="kind_opt_out">Opt Out</label> <p id='description-for-Opt Out'> We will no longer sell or share your personal information. </p> </div> <div class='form-check'> <input type="radio" name="kind" id="kind_pause_processing" value="pause_processing" class="form-check-input" required="required" aria-label="Object to Processing" aria-describedby="description-for-Object to Processing" /> <label class="form-check-label" for="kind_pause_processing">Object to Processing</label> <p id='description-for-Object to Processing'> Ask us to stop processing your data for certain purposes (eg, public interest, legitimate interests, direct marketing) </p> </div> <div class='form-check'> <input type="radio" name="kind" id="kind_rectification" value="rectification" class="form-check-input" required="required" aria-label="Update Inaccuracies" aria-describedby="description-for-Update Inaccuracies" /> <label class="form-check-label" for="kind_rectification">Update Inaccuracies</label> <p id='description-for-Update Inaccuracies'> Update any inaccuracy you've found in our systems </p> </div> </div> <div class='privacy-intake-error-message'> Please choose a request type </div> </div> </div> </div> <div class='privacy-intake-request-type-details hide'> <hr> <div class='row'> <div class='col-xs-12 col-lg-6' id='request-type-details-container'> <h4> <label for='request_type_details'> Request Details </label> </h4> <div class='form-group'> <textarea name="request_type_details" id="request_type_details" rows="7" disabled="disabled" required="required" class="form-control" maxlength="2000" placeholder="What would you like us to correct?"> </textarea> <div class='privacy-intake-error-message'> Additional information is required for this type of request. </div> </div> </div> </div> </div> <hr> <div id='section-6328827e-ab3a-4788-b623-a5bba190091f'> <div> <div class='row'> <div class='col-xs-12 col-lg-5'> <h5> File a Complaint </h5> <div class='form-group'> <label for="2177f254-d96a-498f-a9aa-c19c697dec3e">Report any data use concerns</label> <input type="text" name="[custom][6328827e-ab3a-4788-b623-a5bba190091f][2177f254-d96a-498f-a9aa-c19c697dec3e]" id="2177f254-d96a-498f-a9aa-c19c697dec3e" class="form-control" maxlength="1000" /> </div> </div> </div> </div> <hr> </div> <div class='privacy-intake-notes'> <h2 class='typography typography--h2'> Additional Information </h2> <div class='row'> <div class='col-xs-12 col-lg-6'> <div class='form-group'> <label for="additional_info">Additional information</label> <textarea name="additional_info" id="additional_info" rows="7" class="form-control"> </textarea> </div> </div> </div> </div> <div class='privacy-intake-captcha'> <div class='row'> <div class='col-xs-12 col-lg-6'> <div class='form-group'> <div class='h-captcha' data-callback='onCaptchaSuccess' data-error-callback='onCaptchaError' data-expired-callback='onCaptchaExpire' data-open-callback='onCaptchaOpen' data-sitekey='c0e4e5ba-7506-4402-bda9-3830bf5f568e' data-theme='light'></div> <script async='async' defer='defer' src='https://hcaptcha.com/1/api.js'></script> <div class='privacy-intake-error-message'></div> </div> </div> </div> </div> <script> // Elements function submitButtonElement() { return document.querySelector('#privacy-intake-form .btn[type="submit"]'); } function errorMessageElement() { return document.querySelector('.privacy-intake-captcha .privacy-intake-error-message'); } // Callbacks function onCaptchaExpire() { toggleSubmitButton(false); } function onCaptchaSuccess() { toggleSubmitButton(true); hideCaptchaError(); } function onCaptchaError() { toggleSubmitButton(false); } function onCaptchaOpen() { hideCaptchaError(); } // DOM Changers function toggleSubmitButton(show) { if (show) { submitButtonElement().removeAttribute('disabled'); } else { submitButtonElement().setAttribute('disabled', 'disabled'); } } function showCaptchaError(message) { errorMessageElement().innerText = message; addErrorToParent(errorMessageElement()); } function hideCaptchaError() { errorMessageElement().innerText = ''; removeErrorFromParent(errorMessageElement()); } function showSubmitErrors(errors) { if (errors.hcaptcha) { showCaptchaError(errors.hcaptcha); hcaptcha.reset(); toggleSubmitButton(false); } } </script> <div class='privacy-intake-submit'> <div class='row'> <div class='col-xs-12 col-lg-5'> <label for='submit-request'> <input type="submit" name="submit request" value="Submit Request" class="btn btn-dark" id="submit-request" disabled="disabled" data-disable-with="Submit Request" /> </label> <input type="hidden" name="google_analytics_client_id" id="google_analytics_client_id" value="" autocomplete="off" /> </div> </div> </div> <hr> <div class='row'> <div class='col-xs-12 col-lg-6'> <a href="https://legal.hubspot.com/privacy-policy">HubSpot Privacy Policy</a> </div> </div> </div> </form> </div> <div class='row d-flex justify-content-lg-end'> <div class='d-flex align-items-center justify-content-end col-xs-12 col-lg-6'> <span></span> Powered by <img alt="DataGrail logo" class="privacy-intake-dg-logo" src="/assets/datagrail_logo_color_crop-a8e32d1c0b030165be5c40a0f2958b98531f0b9c3649176fffb201fb0d91ba77.svg" /> </div> </div> </div> <script> var ga_cookie = document.cookie.match(/_ga/); if (ga_cookie && ga_cookie['input']) { var parts = ga_cookie['input'].split('; '); for (var i = 0; i < parts.length; i++) { if (parts[i].indexOf('_ga=') === 0) { var client_id = parts[i].split('.').slice(-2).join('.'); } } var ga_hidden_field = document.getElementById('google_analytics_client_id'); if (ga_hidden_field && client_id){ ga_hidden_field.value = client_id; } } const intake_form = document.getElementById('privacy-intake-form'); const text_elements = document.querySelectorAll("input[type=text], textarea"); const required_inputs = document.querySelectorAll('form .form-control'); let radio_buttons = document.querySelectorAll('form #privacy-intake-kinds .form-check-input'); const radio_error_element = document.getElementById('privacy-intake-kinds-container'); const countrySelect = document.getElementById('reported_country') || ""; const customRequiredCheckboxGroups = document.querySelectorAll('form [id^="custom-checkbox-group"].required'); const authorizedAgentQuestion = document.getElementById('authorized-agent-dropdown') //Add event listeners intake_form.addEventListener('submit', function(e) { validateForm(e, this) }); required_inputs.forEach(function(input) { input.addEventListener('change', function(e) { checkToRemoveErrors(input) }) }); setListenerOnRadios(); customRequiredCheckboxGroups.forEach(function(group) { group.addEventListener('click', function(e) { if (e.target.checked) { removeError(group) } }) }); if (authorizedAgentQuestion) { authorizedAgentQuestion.addEventListener('change', function(e) { updateAuthorizedAgentsSection(); }); } //Functions function setListenerOnRadios() { radio_buttons.forEach(function(radio) { radio.addEventListener('click', function(e) { removeErrorFromParent(radio_error_element); requestTypeChangeHandler(e); }) }); } function requestTypeChangeHandler(event) { var requestDetailsSection = document.querySelector('.privacy-intake-request-type-details'); var requestDetailsTextarea = document.getElementById('request_type_details'); if(event && event.target.value == 'rectification') { requestDetailsSection.classList.remove('hide'); requestDetailsTextarea.disabled = false; } else { requestDetailsSection.classList.add('hide'); requestDetailsTextarea.disabled = true; } } function validateForm(event, form) { event.preventDefault(); event.stopPropagation(); const valid_fields = []; trimAllText(); updateAuthorizedAgentsSection(); let valid_form = form.checkValidity(); valid_fields.push(valid_form); // validate standard & custom text inputs and dropdowns (if required) if(!valid_form){ required_inputs.forEach(function(el) { checkToAddErrors(el) }) } //check email looks close to correct let dataSubjectEmail = document.getElementById('email'); let valid_email = isValidEmail(dataSubjectEmail.value); if(!valid_email) { addErrorToParent(dataSubjectEmail) } valid_fields.push(valid_email); // We need to validate internal customer emails as well, so lets check // if the input exists in the form. const internal_employee_email_elem = document.getElementById('employee_email'); // If the input exists, validate, otherwise move along. if (internal_employee_email_elem) { let valid_internal_employee_email = isValidEmail(internal_employee_email_elem.value); valid_fields.push(valid_internal_employee_email); if (!valid_internal_employee_email) { addErrorToParent(internal_employee_email_elem); } } //check that at least one radio button is selected let valid_radios = isRadioSelected(); if(!valid_radios) { addErrorToParent(radio_error_element) } valid_fields.push(valid_radios); //if there any required checkbox groups, check at least one is selected let invalidCheckboxGroups = getInvalidCheckboxGroups(); let valid_checkboxes = !invalidCheckboxGroups.length; if(!valid_checkboxes) { invalidCheckboxGroups.forEach( function(group) { addError(group) } ) } valid_fields.push(valid_checkboxes); var agentEmail = document.getElementById('agent_email'); var validAgent = isValidAuthorizedAgent(agentEmail, dataSubjectEmail); // We want to check to make sure the form is valid by checking every field that // was added to the valid_fields array. const form_is_valid = valid_fields.every(function(validation) { return validation; }); // Submit if the form is valid if (form_is_valid) { if(isAuthorizedAgent() && !validAgent) { return; } var formElement = document.querySelector('form'); var formResponses = new FormData(formElement); if(agentEmail) { formResponses.append('agent_email', agentEmail.value) } var request = new XMLHttpRequest(); if (typeof(showSubmitErrors) === 'function') { // If captcha feature is enabled, wait for server's response before // switching to 'Thank you' screen request.onreadystatechange = function() { if (this.readyState === 4) { if (this.status === 422) { showSubmitErrors(JSON.parse(this.response).errors); } else { showSubmitMessage(); } } }; } request.open('POST', '/privacy?_gl=1*z95wmv*_ga*MTYyMTg2ODcxMi4xNzE1MTkxODIz*_ga_LXTM6CQ0XK*MTcxNTM2OTg0MS45LjEuMTcxNTM3MTk2OS41OS4wLjA.' + window.location.search.toString()); request.send(formResponses); if (typeof(showSubmitErrors) === 'function') { // If captcha feature is enabled, block "Submit" button and wait document.querySelector('form .btn[type="submit"]').setAttribute('disabled', 'disabled'); } else { // If captcha feature is disabled, show 'Thank you' screen immediately showSubmitMessage(); } } } function isValidAuthorizedAgent(agentEmail, dataSubjectEmail) { if(!agentEmail) { return false; } var invalidAgentEmail = !isValidEmail(agentEmail.value) || (agentEmail.value === dataSubjectEmail.value) if(invalidAgentEmail) { addErrorToParent(agentEmail) return false; } return true; } function trimAllText() { text_elements.forEach( function(text) { text.value = text.value.trim(); }) } function showSubmitMessage() { document.querySelectorAll('.remove-me').forEach( function(el) { el.remove(); }); document.getElementById('add-me').classList.remove('hide'); } const fieldsDisclosedIds = [ 'reported_country', 'privacy-intake-state-select', 'translations-select' ]; function checkToAddErrors(element) { if(!element.validity.valid) { // There are some fields disclosed (country/state/translation) in // a dropdown and if there are errors with those fields, we want // to make sure the dropdown opens up so users can see the errors. if (fieldsDisclosedIds.indexOf(element.id) !== -1) { if (typeof(selectorContent) !== 'undefined' && selectorContent) { selectorContent.classList.remove('hide'); } } addErrorToParent(element); } } function checkToRemoveErrors(element) { if(element.validity.valid) { removeErrorFromParent(element) } } function addErrorToParent(element) { addError(element.parentElement) } //used in custom JS configured for dg_customer function removeErrorFromParent(element) { removeError(element.parentElement) } function addError(element) { element.classList.add('error') } function removeError(element) { element.classList.remove('error') } function isValidEmail(email) { const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return re.test(email); } function isRadioSelected() { for(let i=0; i < radio_buttons.length; i++) { if(radio_buttons[i].checked) { return true;} } return false; } function getInvalidCheckboxGroups() { const groups = Array.prototype.slice.call(customRequiredCheckboxGroups); return groups.filter(function(group) { return !isCheckboxGroupValid(group) }) } function isCheckboxGroupValid(group) { if(group.type === 'checkbox' && group.checked) { return true } let children = group.children; for(let i = 0; i < children.length; i++) { let valid = isCheckboxGroupValid(children[i]); if(valid) { return true } } return false; } function setAuthorizedAgentsFieldRequired(required) { // TODO: generate agentsFields dynamically if these questions are customizable later const firstName = document.getElementById('agent_first_name') const lastName = document.getElementById('agent_last_name') const email = document.getElementById('agent_email') const agentsFields = [firstName, lastName, email] agentsFields.forEach(function(field) { field.required = required; field.disabled = !required; }) } </script> <script> var regionSelect = document.getElementById('privacy-intake-state-select'); // Using this label selector in lieu of the HTML labels api, which is not supported by IE11 var stateDropdownLabel = document.querySelectorAll('label[for="' + regionSelect.id +'"]')[0] countrySelect.addEventListener('change', function(e) { handleCountryChange(e); }) regionSelect.addEventListener('change', function(e) { handleRegionChange(e); }) onLoad(); function onLoad() { updateAuthorizedAgentsSection(); } function updateAuthorizedAgentsSection() { const authorizedAgentSection = document.getElementById('section-agents-section') if (!authorizedAgentSection) { return; } if (isAuthorizedAgent()) { authorizedAgentSection.className = ''; setAuthorizedAgentsFieldRequired(true) } else { authorizedAgentSection.className = 'hide'; setAuthorizedAgentsFieldRequired(false) } } function isAuthorizedAgent() { const dropdown = document.getElementById('authorized-agent-dropdown'); if (!dropdown) { return false }; const selectedOption = dropdown.options[dropdown.selectedIndex].value; return selectedOption == 'agent'; } function handleCountryChange(event) { var queryString = new URLSearchParams(window.location.search); queryString.delete('prc'); if(event.target.value === null) { showRegionDropdown(false); } else { showRegionDropdown(true); updatePolicy(true); } } function handleRegionChange(event) { if(event.target.value == null) { return; } updatePolicy(); } function showRegionDropdown(show) { regionSelect.hidden = !show; regionSelect.disabled = !show; regionSelect.required = show if(stateDropdownLabel) { stateDropdownLabel.hidden = !show }; removeErrorFromParent(regionSelect) } function updatePolicy(resetRegion){ var countryCode = countrySelect.value; var regionCode = regionSelect.value; var queryString = new URLSearchParams(window.location.search); if(!countryCode) { return; } queryString.set('cc', countryCode); if (resetRegion) { queryString.delete('prc'); } else { queryString.set('prc', regionCode); } reloadPage(queryString); } function reloadPage (params) { /* Function to create a simple loading effect when setting the window.location.search value (reloading the page). */ // Setings body class to "dim" the page. document.body.classList.add('loading-intake-form'); const geoSelectorElem = document.querySelector('.geo-selector-content'); const transition = geoSelectorElem.style.transition; // If the hidden form fields for country/state are autofilled by the browser // we do not need to wait for the dropdown collapse, we can just reload the page if (geoSelectorElem.classList.contains('hide')) { window.location.search = params; } else { // We want to wait unti the dropdown collapsing transition has ended // before we set the new window.location.search location. geoSelectorElem.addEventListener('transitionend', function() { window.location.search = params; }); // Set the style so we're ready for the transition. geoSelectorElem.style.transition = transition; geoSelectorElem.style.overflow = 'hidden'; geoSelectorElem.style.height = geoSelectorElem.offsetHeight + 'px'; // We can't set the geo selectors height above and then immediately // set it to transition to 0px, so we have to have a setTimeout // to give the browser time to process the offsetHeight // and then set it to 0px so the transition will happen. setTimeout(function() { geoSelectorElem.style.height = '0px'; }, 10); } } </script> </main> </body> </html>