{"id":38,"date":"2025-07-02T20:48:11","date_gmt":"2025-07-02T20:48:11","guid":{"rendered":"https:\/\/haipestudio.buzzvel.work\/?page_id=38"},"modified":"2025-10-02T20:58:33","modified_gmt":"2025-10-02T20:58:33","slug":"contact","status":"publish","type":"page","link":"https:\/\/haipestudio.buzzvel.work\/en\/contact\/","title":{"rendered":"Contact"},"content":{"rendered":"  <section class=\"main-cta main-cta--h1 \" aria-labelledby=\"main-cta-heading\" >\n          <header class=\"main-cta__header\">\n                          <h1            id=\"main-cta-heading\"\n            class=\"main-cta__title main-cta__title--h1\"\n            >\n            Every transformation <br>starts with a conversation          <\/h1>\n              <\/header>\n    \n    <div class=\"main-cta__content\">\n              <div class=\"main-cta__description \"><p class=\"p1\">Tell us about your biggest bottleneck, and we\u2019ll show you how automation can make it disappear.<\/p>\n<\/div>\n      \n          <\/div>\n  <\/section>\n  <script>\n    document.addEventListener('DOMContentLoaded', function() {\n      document.querySelectorAll('a[data-ph-event]').forEach(function(el) {\n        el.addEventListener('click', function() {\n          if (typeof posthog !== 'undefined') {\n            posthog.capture(el.dataset.phEvent, {\n              title: el.dataset.phTitle,\n              url: el.href,\n              section: 'main-cta'\n            });\n            console.log('PostHog event captured:', el.dataset.phEvent, el.dataset.phTitle);\n          }\n        });\n      });\n    });\n  <\/script>\n\n\n\n\n  <section id=\"\"\n    class=\"contact-form-block\"\n        aria-label=\"Formul\u00e1rio de contato e informa\u00e7\u00f5es de contato\" style=\"background-color: #FFFFFF;\">\n\n    <div class=\"contact-form-block__container\">\n      <div class=\"contact-form-block__grid\">\n\n        <!-- Left Content - Contact Information -->\n        <div class=\"contact-form-block__content\">\n\n          <!-- Main Title and Topics -->\n          \n\n          <!-- Contact Information -->\n          <div class=\"contact-form-block__info \" role=\"region\" aria-label=\"Informa\u00e7\u00f5es de contato\">\n            <!-- Second Title -->\n                          <h3 class=\"contact-form-block__subtitle\">\n                Get In Touch              <\/h3>\n            \n                          <!-- List Layout (Original) -->\n              <!-- Email Info -->\n                              <article class=\"contact-form-block__info-item\" aria-labelledby=\"email-title\">\n                  <div class=\"contact-form-block__info-content\">\n                    <div class=\"contact-form-block__info-icon\" aria-hidden=\"true\">\n                      <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M13.3335 2.83301H2.66683C1.93045 2.83301 1.3335 3.42996 1.3335 4.16634V12.1663C1.3335 12.9027 1.93045 13.4997 2.66683 13.4997H13.3335C14.0699 13.4997 14.6668 12.9027 14.6668 12.1663V4.16634C14.6668 3.42996 14.0699 2.83301 13.3335 2.83301Z\" stroke=\"currentColor\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/>\n<path d=\"M14.6668 4.83301L8.68683 8.63301C8.48101 8.76196 8.24304 8.83035 8.00016 8.83035C7.75729 8.83035 7.51932 8.76196 7.3135 8.63301L1.3335 4.83301\" stroke=\"currentColor\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/>\n<\/svg>\n                    <\/div>\n                    <div class=\"contact-form-block__info-details\">\n                                              <h4 id=\"email-title\" class=\"contact-form-block__info-title\">\n                          Email                        <\/h4>\n                                                                    <a href=\"mailto:hello@haipestudio.com\"\n                          class=\"contact-form-block__info-link contact-form-block__info-link--email\"\n                          aria-label=\"Enviar email para hello@haipestudio.com\">\n                          hello@haipestudio.com                        <\/a>\n                                                                    <p class=\"contact-form-block__info-description\">Send us an email anytime<\/p>\n                                          <\/div>\n                  <\/div>\n                <\/article>\n              \n              <!-- Phone Info -->\n                              <article class=\"contact-form-block__info-item\" aria-labelledby=\"phone-title\">\n                  <div class=\"contact-form-block__info-content\">\n                    <div class=\"contact-form-block__info-icon\" aria-hidden=\"true\">\n                      <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M14.6665 11.4467V13.4467C14.6672 13.6324 14.6292 13.8162 14.5548 13.9863C14.4804 14.1564 14.3713 14.3091 14.2345 14.4346C14.0977 14.5602 13.9362 14.6557 13.7603 14.7152C13.5844 14.7747 13.398 14.7968 13.2131 14.7801C11.1617 14.5572 9.19113 13.8562 7.45979 12.7334C5.84901 11.7098 4.48335 10.3442 3.45979 8.7334C2.33311 6.9942 1.63195 5.01406 1.41313 2.9534C1.39647 2.76904 1.41838 2.58324 1.47746 2.40781C1.53654 2.23239 1.63151 2.07119 1.7563 1.93448C1.8811 1.79777 2.033 1.68854 2.20232 1.61375C2.37164 1.53895 2.55469 1.50024 2.73979 1.50006H4.73979C5.06333 1.49688 5.37699 1.61145 5.6223 1.82242C5.86761 2.03339 6.02784 2.32636 6.07313 2.64673C6.15754 3.28678 6.31409 3.91522 6.53979 4.52006C6.62949 4.75868 6.6489 5.01801 6.59573 5.26732C6.54256 5.51663 6.41903 5.74547 6.23979 5.92673L5.39313 6.7734C6.34216 8.44243 7.7241 9.82436 9.39313 10.7734L10.2398 9.92673C10.4211 9.74749 10.6499 9.62396 10.8992 9.57079C11.1485 9.51762 11.4078 9.53704 11.6465 9.62673C12.2513 9.85243 12.8797 10.009 13.5198 10.0934C13.8436 10.1391 14.1394 10.3022 14.3508 10.5517C14.5622 10.8013 14.6746 11.1198 14.6665 11.4467Z\" stroke=\"currentColor\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/>\n<\/svg>\n                    <\/div>\n                    <div class=\"contact-form-block__info-details\">\n                                              <h4 id=\"phone-title\" class=\"contact-form-block__info-title\">\n                          Phone                        <\/h4>\n                                                                    <a href=\"tel:+310201234567\"\n                          class=\"contact-form-block__info-link contact-form-block__info-link--phone\"\n                          aria-label=\"Ligar para +31 (0) 20 123 4567\">\n                          +31 (0) 20 123 4567                        <\/a>\n                                                                    <p class=\"contact-form-block__info-description\">Mon-Fri from 9am to 6pm WET\/WEST<\/p>\n                                          <\/div>\n                  <\/div>\n                <\/article>\n              \n              <!-- Location Info -->\n                              <article class=\"contact-form-block__info-item\" aria-labelledby=\"location-title\">\n                  <div class=\"contact-form-block__info-content\">\n                    <div class=\"contact-form-block__info-icon\" aria-hidden=\"true\">\n                      <svg width=\"16\" height=\"17\" viewBox=\"0 0 16 17\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M13.3332 6.83333C13.3332 10.162 9.6405 13.6287 8.4005 14.6993C8.28499 14.7862 8.14437 14.8332 7.99984 14.8332C7.85531 14.8332 7.71469 14.7862 7.59917 14.6993C6.35917 13.6287 2.6665 10.162 2.6665 6.83333C2.6665 5.41885 3.22841 4.06229 4.2286 3.0621C5.2288 2.0619 6.58535 1.5 7.99984 1.5C9.41433 1.5 10.7709 2.0619 11.7711 3.0621C12.7713 4.06229 13.3332 5.41885 13.3332 6.83333Z\" stroke=\"currentColor\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/>\n<path d=\"M8 8.83301C9.10457 8.83301 10 7.93758 10 6.83301C10 5.72844 9.10457 4.83301 8 4.83301C6.89543 4.83301 6 5.72844 6 6.83301C6 7.93758 6.89543 8.83301 8 8.83301Z\" stroke=\"currentColor\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/>\n<\/svg>\n                    <\/div>\n                    <div class=\"contact-form-block__info-details\">\n                                              <h4 id=\"location-title\" class=\"contact-form-block__info-title\">\n                          Location                        <\/h4>\n                                                                    <address class=\"contact-form-block__info-address\">Serving Clients Globally<\/address>\n                                                                    <p class=\"contact-form-block__info-description\">Remote-first with European base<\/p>\n                                          <\/div>\n                  <\/div>\n                <\/article>\n              \n              <!-- Response Time Info -->\n                              <article class=\"contact-form-block__info-item\" aria-labelledby=\"response-time-title\">\n                  <div class=\"contact-form-block__info-content\">\n                    <div class=\"contact-form-block__info-icon\" aria-hidden=\"true\">\n                      <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<g clip-path=\"url(#clip0_2548_10202)\">\n<path d=\"M24 0.5C36.9581 0.5 47.5 11.0419 47.5 24C47.5 36.9581 36.9581 47.5 24 47.5C11.0419 47.5 0.5 36.9581 0.5 24C0.5 11.0419 11.0419 0.5 24 0.5ZM24 4.375C13.179 4.375 4.375 13.179 4.375 24C4.375 34.821 13.179 43.625 24 43.625C34.821 43.625 43.625 34.821 43.625 24C43.625 13.179 34.821 4.375 24 4.375Z\" fill=\"currentColor\" stroke=\"#C7F5E1\"\/>\n<path d=\"M25.5 9H22.5V24.6211L31.9394 34.0605L34.0605 31.9394L25.5 23.3789V9Z\" fill=\"currentColor\"\/>\n<\/g>\n<defs>\n<clipPath id=\"clip0_2548_10202\">\n<rect width=\"48\" height=\"48\" fill=\"white\"\/>\n<\/clipPath>\n<\/defs>\n<\/svg>\n                    <\/div>\n                    <div class=\"contact-form-block__info-details\">\n                                              <h4 id=\"response-time-title\" class=\"contact-form-block__info-title\">\n                          Response Time                        <\/h4>\n                                                                    <p class=\"contact-form-block__info-time\">Within 24 Hours<\/p>\n                                                                    <p class=\"contact-form-block__info-description\">Fast response guaranteed<\/p>\n                                          <\/div>\n                  <\/div>\n                <\/article>\n                          \n          <\/div>\n        <\/div>\n\n        <!-- Right Form -->\n        <div id=\"free-audit\" class=\"contact-form-block__form-wrapper \">\n          <div class=\"contact-form-block__form-container\">\n                          <div class=\"contact-form-block__form-content\"\n                role=\"region\"\n                aria-label=\"contact form\"\n                >\n                <div class='fluentform ff-default fluentform_wrapper_4 ffs_default_wrap'><form data-form_id=\"4\" id=\"fluentform_4\" class=\"frm-fluent-form fluent_form_4 ff-el-form-top ff_form_instance_4_1 ff-form-loading ffs_default\" data-form_instance=\"ff_form_instance_4_1\" method=\"POST\" ><fieldset  style=\"border: none!important;margin: 0!important;padding: 0!important;background-color: transparent!important;box-shadow: none!important;outline: none!important; min-inline-size: 100%;\">\n                    <legend class=\"ff_screen_reader_title\" style=\"display: block; margin: 0!important;padding: 0!important;height: 0!important;text-indent: -999999px;width: 0!important;overflow:hidden;\">Contact Form<\/legend><input type='hidden' name='__fluent_form_embded_post_id' value='38' \/><input type=\"hidden\" id=\"_fluentform_4_fluentformnonce\" name=\"_fluentform_4_fluentformnonce\" value=\"585d9184e2\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/en\/wp-json\/wp\/v2\/pages\/38\" \/><div class='ff-el-group  ff-custom_html' tabindex='-1' data-name=\"custom_html-4_1\" ><div>\n<h3>Start Your Automation Journey<\/h3>\n<\/div><\/div><div data-name=\"ff_cn_id_1\"  class='ff-t-container ff-column-container ff_columns_total_2 '><div class='ff-t-cell ff-t-column-1' style='flex-basis: 50%;'><div class='ff-el-group'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_4_input_text' id='label_ff_4_input_text' aria-label=\"Name\">Name<\/label><\/div><div class='ff-el-input--content'><input type=\"text\" name=\"input_text\" class=\"ff-el-form-control\" placeholder=\"Your full name\" data-name=\"input_text\" id=\"ff_4_input_text\"  aria-invalid=\"false\" aria-required=true><\/div><\/div><\/div><div class='ff-t-cell ff-t-column-2' style='flex-basis: 50%;'><div class='ff-el-group'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_4_email' id='label_ff_4_email' aria-label=\"Email\">Email<\/label><\/div><div class='ff-el-input--content'><input type=\"email\" name=\"email\" id=\"ff_4_email\" class=\"ff-el-form-control\" placeholder=\"Email Address\" data-name=\"email\" autocomplete=\"email\" inputmode=\"email\"  aria-invalid=\"false\" aria-required=true><\/div><\/div><\/div><\/div><div data-name=\"ff_cn_id_2\"  class='ff-t-container ff-column-container ff_columns_total_2 '><div class='ff-t-cell ff-t-column-1' style='flex-basis: 50%;'><div class='ff-el-group'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_4_phone' id='label_ff_4_phone' aria-label=\"Phone\">Phone<\/label><\/div><div class='ff-el-input--content'><input name=\"phone\" class=\"ff-el-form-control ff-el-phone ff_el_with_extended_validation\" type=\"tel\" data-name=\"phone\" autocomplete=\"tel\" inputmode=\"tel\" id=\"ff_4_phone\"  aria-invalid='false' aria-required=true><\/div><\/div><\/div><div class='ff-t-cell ff-t-column-2' style='flex-basis: 50%;'><div class='ff-el-group'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_4_input_text_1' id='label_ff_4_input_text_1' aria-label=\"Company\">Company<\/label><\/div><div class='ff-el-input--content'><input type=\"text\" name=\"input_text_1\" class=\"ff-el-form-control\" placeholder=\"Your company name\" data-name=\"input_text_1\" id=\"ff_4_input_text_1\"  aria-invalid=\"false\" aria-required=true><\/div><\/div><\/div><\/div><div data-name=\"ff_cn_id_3\"  class='ff-t-container ff-column-container ff_columns_total_1 '><div class='ff-t-cell ff-t-column-1' style='flex-basis: 100%;'><div class='ff-el-group'><div class=\"ff-el-input--label asterisk-right\"><label for='ff_4_dropdown_2' id='label_ff_4_dropdown_2' aria-label=\"Subject\">Subject<\/label><\/div><div class='ff-el-input--content'><select name=\"dropdown_2\" id=\"ff_4_dropdown_2\" class=\"ff-el-form-control\" data-name=\"dropdown_2\" data-calc_value=\"0\"  aria-invalid=\"false\" aria-required=\"false\" aria-labelledby=\"label_ff_4_dropdown_2\"><option value=\"\">&#8211; Subject &#8211;<\/option><option value=\"Project Proposal\"  >Project Proposal<\/option><option value=\"Partnership\"  >Partnership<\/option><option value=\"Other\"  >Other<\/option><\/select><\/div><\/div><\/div><\/div><div data-name=\"ff_cn_id_4\"  class='ff-t-container ff-column-container ff_columns_total_2 has-conditions'><div class='ff-t-cell ff-t-column-1' style='flex-basis: 50%;'><div class='ff-el-group'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_4_dropdown' id='label_ff_4_dropdown' aria-label=\"Project Type\">Project Type<\/label><\/div><div class='ff-el-input--content'><select name=\"dropdown\" id=\"ff_4_dropdown\" class=\"ff-el-form-control\" data-name=\"dropdown\" data-calc_value=\"0\"  aria-invalid=\"false\" aria-required=\"true\" aria-labelledby=\"label_ff_4_dropdown\"><option value=\"\">Select project type<\/option><option value=\"Automation Pack\"  >Automation Pack<\/option><option value=\"AI Agent\"  >AI Agent<\/option><option value=\"Custom Integration\"  >Custom Integration<\/option><option value=\"Automation-as-a-service\"  >Automation-as-a-service<\/option><option value=\"Consultation Only\"  >Consultation Only<\/option><option value=\"Other\"  >Other<\/option><\/select><\/div><\/div><\/div><div class='ff-t-cell ff-t-column-2' style='flex-basis: 50%;'><div class='ff-el-group'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_4_dropdown_1' id='label_ff_4_dropdown_1' aria-label=\"Timeline\">Timeline<\/label><\/div><div class='ff-el-input--content'><select name=\"dropdown_1\" id=\"ff_4_dropdown_1\" class=\"ff-el-form-control\" data-name=\"dropdown_1\" data-calc_value=\"0\"  aria-invalid=\"false\" aria-required=\"true\" aria-labelledby=\"label_ff_4_dropdown_1\"><option value=\"\">Project timeline<\/option><option value=\"ASAP\"  >ASAP<\/option><option value=\"Within 1 month\"  >Within 1 month<\/option><option value=\"Within 3 months\"  >Within 3 months<\/option><option value=\"Just planning\"  >Just planning<\/option><\/select><\/div><\/div><\/div><\/div><div class='ff-el-group has-conditions'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_4_description' id='label_ff_4_description' aria-label=\"Project Details\">Project Details<\/label><\/div><div class='ff-el-input--content'><textarea aria-required=\"true\" aria-labelledby=\"label_ff_4_description\" name=\"description\" id=\"ff_4_description\" class=\"ff-el-form-control\" placeholder=\"Tell us about your current processes and automation goals...\" rows=\"10\" cols=\"2\" data-name=\"description\" ><\/textarea><\/div><\/div><div class='ff-el-group has-conditions'><div class=\"ff-el-input--label ff-el-is-required asterisk-right\"><label for='ff_4_description_1' id='label_ff_4_description_1' aria-label=\"Observations\">Observations<\/label><\/div><div class='ff-el-input--content'><textarea aria-required=\"true\" aria-labelledby=\"label_ff_4_description_1\" name=\"description_1\" id=\"ff_4_description_1\" class=\"ff-el-form-control\" placeholder=\"Tell us about your contact.\" rows=\"10\" cols=\"2\" data-name=\"description_1\" ><\/textarea><\/div><\/div><div class='ff-el-group'><div class=\"ff-el-input--label asterisk-right\"><label for='ff_4_dropdown_3' id='label_ff_4_dropdown_3' aria-label=\"How did you hear about us?\">How did you hear about us?<\/label><\/div><div class='ff-el-input--content'><select name=\"dropdown_3\" id=\"ff_4_dropdown_3\" class=\"ff-el-form-control\" data-name=\"dropdown_3\" data-calc_value=\"0\"  aria-invalid=\"false\" aria-required=\"false\" aria-labelledby=\"label_ff_4_dropdown_3\"><option value=\"\">&#8211; Select &#8211;<\/option><option value=\"ChatGPT\/Claude\/Preplexity\"  >ChatGPT\/Claude\/Preplexity<\/option><option value=\"LinkedIn\"  >LinkedIn<\/option><option value=\"Instagram\"  >Instagram<\/option><option value=\"Clutch\"  >Clutch<\/option><option value=\"Google\"  >Google<\/option><\/select><\/div><\/div><div class='ff-el-group    ff-el-input--content'><div class='ff-el-form-check ff-el-tc'><label aria-label='Terms and Conditions: By proceeding, you agree to Haipe\u2019s Privacy Policy and Terms of Service Contains 2 links. Use tab navigation to review.' class='ff-el-form-check-label ff_tc_label' for=terms-n-condition_1ee4c37944098512b00dfe9b64739a8a><span class='ff_tc_checkbox'><input type=\"checkbox\" name=\"terms-n-condition\" class=\"ff-el-form-check-input\" data-name=\"terms-n-condition\" id=\"terms-n-condition_1ee4c37944098512b00dfe9b64739a8a\"  value='on' aria-invalid='false' aria-required=true><\/span> <div class='ff_t_c'><p>By proceeding, you agree to Haipe\u2019s <a href=\"https:\/\/haipestudio.buzzvel.work\/privacy-policy\/\">Privacy Policy<\/a> and <a href=\"https:\/\/haipestudio.buzzvel.work\/terms-of-service\/\">Terms of Service<\/a><\/p><\/div><\/label><\/div><\/div><div class='ff-el-group ff-text-center ff_submit_btn_wrapper'><button type=\"submit\" class=\"ff-btn ff-btn-submit ff-btn-md ff_btn_style\"  aria-label=\"Send message\">Send message<\/button><\/div><\/fieldset><\/form><div id='fluentform_4_errors' class='ff-errors-in-stack ff_form_instance_4_1 ff-form-loading_errors ff_form_instance_4_1_errors'><\/div><\/div>            <script type=\"text\/javascript\">\n                window.fluent_form_ff_form_instance_4_1 = {\"id\":\"4\",\"ajaxUrl\":\"https:\\\/\\\/haipestudio.buzzvel.work\\\/wp-admin\\\/admin-ajax.php\",\"settings\":{\"layout\":{\"labelPlacement\":\"top\",\"asteriskPlacement\":\"asterisk-right\",\"helpMessagePlacement\":\"with_label\",\"errorMessagePlacement\":\"inline\",\"cssClassName\":\"\"},\"restrictions\":{\"denyEmptySubmission\":{\"enabled\":false}}},\"form_instance\":\"ff_form_instance_4_1\",\"form_id_selector\":\"fluentform_4\",\"rules\":{\"input_text\":{\"required\":{\"value\":true,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true}},\"email\":{\"required\":{\"value\":true,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true},\"email\":{\"value\":true,\"message\":\"This field must contain a valid email\",\"global_message\":\"This field must contain a valid email\",\"global\":true}},\"phone\":{\"required\":{\"value\":true,\"global\":true,\"message\":\"This field is required\",\"global_message\":\"This field is required\"},\"valid_phone_number\":{\"value\":true,\"global\":true,\"message\":\"Phone number is not valid\",\"global_message\":\"Phone number is not valid\"}},\"input_text_1\":{\"required\":{\"value\":true,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true}},\"dropdown_2\":{\"required\":{\"value\":false,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true}},\"dropdown\":{\"required\":{\"value\":true,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true}},\"dropdown_1\":{\"required\":{\"value\":true,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true}},\"description\":{\"required\":{\"value\":true,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true}},\"description_1\":{\"required\":{\"value\":true,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true}},\"dropdown_3\":{\"required\":{\"value\":false,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true}},\"terms-n-condition\":{\"required\":{\"value\":true,\"message\":\"This field is required\",\"global_message\":\"This field is required\",\"global\":true}}},\"debounce_time\":300,\"conditionals\":{\"ff_cn_id_4\":{\"type\":\"any\",\"status\":true,\"conditions\":[{\"field\":\"dropdown_2\",\"value\":\"Project Proposal\",\"operator\":\"=\"}],\"condition_groups\":[{\"rules\":[{\"field\":\"\",\"value\":\"\",\"operator\":\"\"}],\"title\":\"\",\"isEditingTitle\":false,\"isPreviewOpen\":false,\"isGroupOpen\":true}]},\"dropdown\":{\"conditions\":[],\"status\":false,\"type\":\"any\",\"container_condition\":{\"type\":\"any\",\"status\":true,\"conditions\":[{\"field\":\"dropdown_2\",\"value\":\"Project Proposal\",\"operator\":\"=\"}],\"condition_groups\":[{\"rules\":[{\"field\":\"\",\"value\":\"\",\"operator\":\"\"}],\"title\":\"\",\"isEditingTitle\":false,\"isPreviewOpen\":false,\"isGroupOpen\":true}]}},\"dropdown_1\":{\"conditions\":[],\"status\":false,\"type\":\"any\",\"container_condition\":{\"type\":\"any\",\"status\":true,\"conditions\":[{\"field\":\"dropdown_2\",\"value\":\"Project Proposal\",\"operator\":\"=\"}],\"condition_groups\":[{\"rules\":[{\"field\":\"\",\"value\":\"\",\"operator\":\"\"}],\"title\":\"\",\"isEditingTitle\":false,\"isPreviewOpen\":false,\"isGroupOpen\":true}]}},\"description\":{\"type\":\"any\",\"status\":true,\"conditions\":[{\"field\":\"dropdown_2\",\"value\":\"Project Proposal\",\"operator\":\"=\"}],\"condition_groups\":[{\"rules\":[{\"field\":\"\",\"value\":\"\",\"operator\":\"\"}],\"title\":\"\",\"isEditingTitle\":false,\"isPreviewOpen\":false,\"isGroupOpen\":true}]},\"description_1\":{\"type\":\"any\",\"status\":true,\"conditions\":[{\"field\":\"dropdown_2\",\"value\":\"Project Proposal\",\"operator\":\"!=\"}],\"condition_groups\":[{\"rules\":[{\"field\":\"\",\"value\":\"\",\"operator\":\"\"}],\"title\":\"\",\"isEditingTitle\":false,\"isPreviewOpen\":false,\"isGroupOpen\":true}]}}};\n                            <\/script>\n                          <\/div>\n                      <\/div>\n        <\/div>\n\n      <\/div>\n    <\/div>\n  <\/section>\n\n\n<script>\nclass HaipeCustomSelect {\n\tconstructor(element, options = {}) {\n\t\tthis.element = element;\n\t\tthis.options = {\n\t\t\tplaceholder: 'Select...',\n\t\t\tallowCustom: false,\n\t\t\tsearchable: false,\n\t\t\t...options\n\t\t};\n\t\t\n\t\tthis.isOpen = false;\n\t\tthis.selectedValue = '';\n\t\tthis.selectedText = '';\n\t\tthis.selectedValues = []; \/\/ For multiple selection\n\t\tthis.selectedTexts = []; \/\/ For multiple selection\n\t\tthis.isMultiple = this.element.hasAttribute('multiple');\n\t\tthis.originalSelect = null;\n\t\t\n\t\tthis.init();\n\t}\n\t\n\tinit() {\n\t\t\/\/ Store reference to original select\n\t\tthis.originalSelect = this.element;\n\t\t\n\t\t\/\/ Store original options for restoration\n\t\tthis.originalOptions = Array.from(this.originalSelect.options).map(opt => ({\n\t\t\tvalue: opt.value,\n\t\t\ttext: opt.textContent,\n\t\t\tselected: opt.selected\n\t\t}));\n\t\t\n\t\t\/\/ Initialize selected values for multiple select\n\t\tif (this.isMultiple) {\n\t\t\tthis.selectedValues = [];\n\t\t\tthis.selectedTexts = [];\n\t\t\t\n\t\t\t\/\/ Get initially selected options\n\t\t\tArray.from(this.originalSelect.selectedOptions).forEach(option => {\n\t\t\t\tif (option.value && option.value !== '') {\n\t\t\t\t\tthis.selectedValues.push(option.value);\n\t\t\t\t\tthis.selectedTexts.push(option.textContent);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\t\/\/ Create custom select structure\n\t\tthis.createCustomSelect();\n\t\t\n\t\t\/\/ Bind events\n\t\tthis.bindEvents();\n\t\t\n\t\t\/\/ Set initial state\n\t\tthis.updateDisplay();\n\t}\n\t\n\tcreateCustomSelect() {\n\t\t\/\/ Store a reference to the original select before any modifications\n\t\tthis.originalSelectElement = this.originalSelect;\n\t\t\n\t\t\/\/ For multiple selects, keep original select visible but hidden from view\n\t\t\/\/ For single selects, hide completely\n\t\tif (this.isMultiple) {\n\t\t\t\/\/ Keep original select accessible but visually hidden\n\t\t\tthis.originalSelect.style.position = 'absolute';\n\t\t\tthis.originalSelect.style.left = '-9999px';\n\t\t\tthis.originalSelect.style.opacity = '0';\n\t\t\tthis.originalSelect.style.pointerEvents = 'none';\n\t\t\tthis.originalSelect.style.zIndex = '-1';\n\t\t} else {\n\t\t\t\/\/ Hide original select completely for single selects\n\t\t\tthis.originalSelect.style.display = 'none';\n\t\t}\n\t\t\n\t\t\/\/ Create wrapper\n\t\tthis.wrapper = document.createElement('div');\n\t\tthis.wrapper.className = 'haipe-custom-select';\n\t\tif (this.isMultiple) {\n\t\t\tthis.wrapper.classList.add('haipe-custom-select--multiple');\n\t\t}\n\t\t\n\t\t\/\/ Create label if original has one\n\t\tif (this.originalSelect.previousElementSibling && \n\t\t\tthis.originalSelect.previousElementSibling.tagName === 'LABEL') {\n\t\t\tconst label = document.createElement('label');\n\t\t\tlabel.className = 'haipe-custom-select__label';\n\t\t\tlabel.textContent = this.originalSelect.previousElementSibling.textContent;\n\t\t\tthis.wrapper.appendChild(label);\n\t\t}\n\t\t\n\t\t\/\/ Create input\n\t\tthis.input = document.createElement('input');\n\t\tthis.input.type = 'text';\n\t\tthis.input.className = 'haipe-custom-select__input';\n\t\tthis.input.placeholder = this.options.placeholder;\n\t\tthis.input.readOnly = true;\n\t\t\n\t\t\/\/ Create selected items container for multiple selection\n\t\tif (this.isMultiple) {\n\t\t\tthis.selectedContainer = document.createElement('div');\n\t\t\tthis.selectedContainer.className = 'haipe-custom-select__selected-container';\n\t\t}\n\t\t\n\t\t\/\/ Check if original select has a placeholder option and set initial display\n\t\tconst hasPlaceholder = this.originalSelect.querySelector('option[value=\"\"]') || \n\t\t\t\t\t\t\t   this.originalSelect.querySelector('option[data-placeholder]') ||\n\t\t\t\t\t\t\t   this.originalSelect.querySelector('option.placeholder-option');\n\t\t\n\t\tif (hasPlaceholder && !this.originalSelect.value) {\n\t\t\tthis.input.value = '';\n\t\t}\n\t\t\n\t\t\/\/ Create chevron icon using existing SVG file\n\t\tthis.chevron = document.createElement('div');\n\t\tthis.chevron.className = 'haipe-custom-select__chevron';\n\t\tthis.chevron.innerHTML = `<svg width=\"12\" height=\"7\" viewBox=\"0 0 12 7\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M5.9997 6.99838C5.86636 6.99838 5.74136 6.97738 5.6247 6.93538C5.50803 6.89404 5.3997 6.82338 5.2997 6.72338L0.674696 2.09838C0.491363 1.91504 0.40403 1.68571 0.412696 1.41038C0.420696 1.13571 0.516363 0.906711 0.699696 0.723377C0.883029 0.540044 1.11636 0.448377 1.3997 0.448377C1.68303 0.448377 1.91636 0.540044 2.0997 0.723377L5.9997 4.62338L9.9247 0.698377C10.108 0.515043 10.3374 0.427377 10.6127 0.435377C10.8874 0.444044 11.1164 0.540044 11.2997 0.723377C11.483 0.906711 11.5747 1.14004 11.5747 1.42338C11.5747 1.70671 11.483 1.94004 11.2997 2.12338L6.6997 6.72338C6.5997 6.82338 6.49136 6.89404 6.3747 6.93538C6.25803 6.97738 6.13303 6.99838 5.9997 6.99838Z\" fill=\"#4D5356\"\/>\n<\/svg>\n`;\n\t\t\n\t\t\/\/ Make chevron clickable to toggle dropdown\n\t\tthis.chevron.addEventListener('click', (e) => {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\t\n\t\t\tif (this.isOpen) {\n\t\t\t\tthis.closeDropdown();\n\t\t\t} else {\n\t\t\t\tthis.openDropdown();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\/\/ Create dropdown\n\t\tthis.dropdown = document.createElement('div');\n\t\tthis.dropdown.className = 'haipe-custom-select__dropdown';\n\t\t\n\t\t\/\/ Create options\n\t\tthis.createOptions();\n\t\t\n\t\t\/\/ Create hint text if original has data-hint\n\t\tif (this.originalSelect.dataset.hint) {\n\t\t\tconst hint = document.createElement('span');\n\t\t\thint.className = 'haipe-custom-select__hint';\n\t\t\thint.textContent = this.originalSelect.dataset.hint;\n\t\t\tthis.wrapper.appendChild(hint);\n\t\t}\n\t\t\n\t\t\/\/ Assemble\n\t\tif (this.isMultiple) {\n\t\t\tthis.wrapper.appendChild(this.selectedContainer);\n\t\t}\n\t\tthis.wrapper.appendChild(this.input);\n\t\tthis.wrapper.appendChild(this.chevron);\n\t\tthis.wrapper.appendChild(this.dropdown);\n\t\t\n\t\t\/\/ Insert after original select\n\t\tthis.originalSelect.parentNode.insertBefore(this.wrapper, this.originalSelect.nextSibling);\n\t}\n\t\n\tcreateOptions() {\n\t\t\/\/ Clear existing options\n\t\tthis.dropdown.innerHTML = '';\n\t\t\n\t\t\/\/ Get options from original select, filtering out placeholder options\n\t\tconst options = Array.from(this.originalSelect.options).filter(option => {\n\t\t\t\/\/ Filter out options that are placeholders (empty value or specific placeholder indicators)\n\t\t\treturn option.value !== '' && \n\t\t\t\t   option.value !== null && \n\t\t\t\t   !option.hasAttribute('data-placeholder') &&\n\t\t\t\t   !option.classList.contains('placeholder-option');\n\t\t});\n\t\t\n\t\toptions.forEach((option, index) => {\n\t\t\tconst optionElement = document.createElement('div');\n\t\t\toptionElement.className = 'haipe-custom-select__option';\n\t\t\toptionElement.textContent = option.textContent;\n\t\t\t\/\/ Store both value and text for better matching\n\t\t\toptionElement.dataset.value = option.value;\n\t\t\toptionElement.dataset.text = option.textContent;\n\t\t\t\n\t\t\tif (option.disabled) {\n\t\t\t\toptionElement.classList.add('haipe-custom-select__option--disabled');\n\t\t\t}\n\t\t\t\n\t\t\t\/\/ Check if option is selected (for both single and multiple)\n\t\t\tif (this.isMultiple) {\n\t\t\t\tif (this.selectedValues.includes(option.value) || this.selectedValues.includes(option.textContent)) {\n\t\t\t\t\toptionElement.classList.add('haipe-custom-select__option--selected');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (option.value === this.originalSelect.value) {\n\t\t\t\t\toptionElement.classList.add('haipe-custom-select__option--selected');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\toptionElement.addEventListener('click', (e) => {\n\t\t\t\tif (!option.disabled) {\n\t\t\t\t\t\/\/ Use the actual option value, not text content\n\t\t\t\t\tthis.selectOption(option.value, option.textContent);\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tthis.dropdown.appendChild(optionElement);\n\t\t});\n\t}\n\t\n\tbindEvents() {\n\t\t\/\/ Input click - toggle dropdown (open if closed, close if open)\n\t\tthis.input.addEventListener('click', (e) => {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\t\t\t\n\t\t\tif (this.isOpen) {\n\t\t\t\tthis.closeDropdown();\n\t\t\t} else {\n\t\t\t\tthis.openDropdown();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\/\/ Removed focus event to prevent conflict with click event\n\t\t\n\t\t\/\/ For multiple select, also make the selected container clickable\n\t\tif (this.isMultiple) {\n\t\t\tthis.selectedContainer.addEventListener('click', (e) => {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopPropagation();\n\t\t\t\t\n\t\t\t\tif (this.isOpen) {\n\t\t\t\t\tthis.closeDropdown();\n\t\t\t\t} else {\n\t\t\t\t\tthis.openDropdown();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\t\n\t\t\/\/ Disable custom input - only allow selection from dropdown\n\t\t\/\/ Removed custom input functionality to prevent typing\n\t\t\n\t\t\/\/ Click outside to close\n\t\tdocument.addEventListener('click', (e) => {\n\t\t\tconst isInput = e.target === this.input;\n\t\t\tconst isInsideWrapper = this.wrapper && this.wrapper.contains(e.target);\n\t\t\tconst isChevron = e.target === this.chevron || this.chevron.contains(e.target);\n\t\t\tconst isDropdown = e.target === this.dropdown || this.dropdown.contains(e.target);\n\t\t\tconst isSelectedContainer = this.isMultiple && (e.target === this.selectedContainer || this.selectedContainer.contains(e.target));\n\t\t\t\n\t\t\tconst shouldIgnore = isInput || isInsideWrapper || isChevron || isDropdown || isSelectedContainer;\n\t\t\t\n\t\t\tif (!shouldIgnore) {\n\t\t\t\tthis.closeDropdown();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\/\/ Keyboard navigation\n\t\tthis.input.addEventListener('keydown', (e) => {\n\t\t\tswitch (e.key) {\n\t\t\t\tcase 'Enter':\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tif (this.isOpen) {\n\t\t\t\t\t\tthis.closeDropdown();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.openDropdown();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Escape':\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.closeDropdown();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ArrowDown':\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.openDropdown();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'Tab':\n\t\t\t\t\tthis.closeDropdown();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t});\n\t}\n\t\n\ttoggleDropdown() {\n\t\tif (this.isOpen) {\n\t\t\tthis.closeDropdown();\n\t\t} else {\n\t\t\tthis.openDropdown();\n\t\t}\n\t}\n\t\n\topenDropdown() {\n\t\tif (this.isOpen) return;\n\t\t\n\t\tthis.isOpen = true;\n\t\tthis.dropdown.classList.add('haipe-custom-select__dropdown--open');\n\t\tthis.chevron.classList.add('haipe-custom-select__chevron--open');\n\t\tthis.input.classList.add('ring-2', 'ring-haipe_purple-500\/20');\n\t\t\n\t\t\/\/ Ensure dropdown is visible and positioned correctly\n\t\tthis.dropdown.style.display = 'block';\n\t}\n\t\n\tcloseDropdown() {\n\t\tif (!this.isOpen) return;\n\t\t\n\t\tthis.isOpen = false;\n\t\tthis.dropdown.classList.remove('haipe-custom-select__dropdown--open');\n\t\tthis.chevron.classList.remove('haipe-custom-select__chevron--open');\n\t\tthis.input.classList.remove('ring-2', 'ring-haipe_purple-500\/20');\n\t}\n\t\n\tselectOption(value, text) {\n\t\t\/\/ Don't allow selecting placeholder values\n\t\tif (!value || value === '' || value === null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (this.isMultiple) {\n\t\t\t\/\/ Handle multiple selection\n\t\t\t\/\/ Check if value is already selected (by value or text)\n\t\t\tconst optionIndexByValue = this.selectedValues.indexOf(value);\n\t\t\tconst optionIndexByText = this.selectedValues.indexOf(text);\n\t\t\tconst optionIndex = optionIndexByValue > -1 ? optionIndexByValue : optionIndexByText;\n\t\t\t\n\t\t\tif (optionIndex > -1) {\n\t\t\t\t\/\/ Remove if already selected\n\t\t\t\tthis.selectedValues.splice(optionIndex, 1);\n\t\t\t\tthis.selectedTexts.splice(optionIndex, 1);\n\t\t\t} else {\n\t\t\t\t\/\/ Add if not selected - use the actual option value from the original select\n\t\t\t\t\/\/ Find the corresponding option in the original select\n\t\t\t\tconst originalSelect = this.originalSelectElement || this.originalSelect;\n\t\t\t\tconst originalOption = Array.from(originalSelect.options).find(opt => \n\t\t\t\t\topt.value === value || opt.textContent.trim() === value.trim() || opt.textContent.trim() === text.trim()\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tif (originalOption) {\n\t\t\t\t\tthis.selectedValues.push(originalOption.value);\n\t\t\t\t\tthis.selectedTexts.push(originalOption.textContent);\n\t\t\t\t} else {\n\t\t\t\t\t\/\/ Fallback to the provided values\n\t\t\t\t\tthis.selectedValues.push(value);\n\t\t\t\t\tthis.selectedTexts.push(text);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\/\/ Update option visual state\n\t\t\tconst selectedOption = this.dropdown.querySelector(`[data-value=\"${value}\"]`);\n\t\t\tif (selectedOption) {\n\t\t\t\tif (optionIndex > -1) {\n\t\t\t\t\tselectedOption.classList.remove('haipe-custom-select__option--selected');\n\t\t\t\t} else {\n\t\t\t\t\tselectedOption.classList.add('haipe-custom-select__option--selected');\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\/\/ Handle single selection\n\t\t\tthis.selectedValue = value;\n\t\t\tthis.selectedText = text;\n\t\t\t\n\t\t\t\/\/ Remove selected class from all options\n\t\t\tthis.dropdown.querySelectorAll('.haipe-custom-select__option').forEach(option => {\n\t\t\t\toption.classList.remove('haipe-custom-select__option--selected');\n\t\t\t});\n\t\t\t\n\t\t\t\/\/ Add selected class to the chosen option\n\t\t\tconst selectedOption = this.dropdown.querySelector(`[data-value=\"${value}\"]`);\n\t\t\tif (selectedOption) {\n\t\t\t\tselectedOption.classList.add('haipe-custom-select__option--selected');\n\t\t\t}\n\t\t\t\n\t\t\t\/\/ Close dropdown for single selection\n\t\t\tthis.closeDropdown();\n\t\t}\n\t\t\n\t\t\/\/ Update display\n\t\tthis.updateDisplay();\n\t\t\n\t\t\/\/ Update original select\n\t\tthis.updateOriginalSelect();\n\t\t\n\t\t\/\/ Trigger change event\n\t\tthis.triggerChangeEvent();\n\t}\n\t\n\tupdateDisplay() {\n\t\tif (this.isMultiple) {\n\t\t\t\/\/ Handle multiple selection display\n\t\t\tif (this.selectedValues.length > 0) {\n\t\t\t\t\/\/ Clear selected container\n\t\t\t\tthis.selectedContainer.innerHTML = '';\n\t\t\t\t\n\t\t\t\t\/\/ Add selected items as chips\n\t\t\t\tthis.selectedTexts.forEach((text, index) => {\n\t\t\t\t\tconst chip = document.createElement('div');\n\t\t\t\t\tchip.className = 'haipe-custom-select__chip';\n\t\t\t\t\tchip.innerHTML = `\n\t\t\t\t\t\t<span class=\"haipe-custom-select__chip-text\">${text}<\/span>\n\t\t\t\t\t\t<button type=\"button\" class=\"haipe-custom-select__chip-remove\" data-value=\"${this.selectedValues[index]}\">\n\t\t\t\t\t\t\t<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n\t\t\t\t\t\t\t\t<path d=\"M9 3L3 9M3 3L9 9\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\/>\n\t\t\t\t\t\t\t<\/svg>\n\t\t\t\t\t\t<\/button>\n\t\t\t\t\t`;\n\t\t\t\t\t\n\t\t\t\t\t\/\/ Add remove event listener\n\t\t\t\t\tconst removeBtn = chip.querySelector('.haipe-custom-select__chip-remove');\n\t\t\t\t\tremoveBtn.addEventListener('click', (e) => {\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\tthis.removeSelectedItem(this.selectedValues[index]);\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\tthis.selectedContainer.appendChild(chip);\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tthis.input.style.display = 'none';\n\t\t\t\tthis.selectedContainer.classList.add('has-selection');\n\t\t\t} else {\n\t\t\t\tthis.selectedContainer.innerHTML = '';\n\t\t\t\tthis.input.style.display = 'block';\n\t\t\t\tthis.input.value = '';\n\t\t\t\tthis.selectedContainer.classList.remove('has-selection');\n\t\t\t}\n\t\t} else {\n\t\t\t\/\/ Handle single selection display\n\t\t\tif (this.selectedText && this.selectedValue && this.selectedValue !== '') {\n\t\t\t\tthis.input.value = this.selectedText;\n\t\t\t\tthis.input.classList.add('border-haipe_purple-500');\n\t\t\t\tthis.input.classList.remove('placeholder-shown');\n\t\t\t} else {\n\t\t\t\tthis.input.value = '';\n\t\t\t\tthis.input.classList.remove('border-haipe_purple-500');\n\t\t\t\tthis.input.classList.add('placeholder-shown');\n\t\t\t}\n\t\t}\n\t}\n\t\n\tremoveSelectedItem(value) {\n\t\tconst index = this.selectedValues.indexOf(value);\n\t\tif (index > -1) {\n\t\t\tthis.selectedValues.splice(index, 1);\n\t\t\tthis.selectedTexts.splice(index, 1);\n\t\t\t\n\t\t\t\/\/ Update option visual state\n\t\t\tconst selectedOption = this.dropdown.querySelector(`[data-value=\"${value}\"]`);\n\t\t\tif (selectedOption) {\n\t\t\t\tselectedOption.classList.remove('haipe-custom-select__option--selected');\n\t\t\t}\n\t\t\t\n\t\t\t\/\/ Update display\n\t\t\tthis.updateDisplay();\n\t\t\t\n\t\t\t\/\/ Update original select\n\t\t\tthis.updateOriginalSelect();\n\t\t\t\n\t\t\t\/\/ Trigger change event\n\t\t\tthis.triggerChangeEvent();\n\t\t}\n\t}\n\t\n\tupdateOriginalSelect() {\n\t\tif (this.isMultiple) {\n\t\t\t\/\/ Use the stored reference to the original select element\n\t\t\tconst originalSelect = this.originalSelectElement || this.originalSelect;\n\t\t\t\n\t\t\t\/\/ Check if the select has options, if not, restore them\n\t\t\tif (originalSelect.options.length === 0) {\n\t\t\t\tthis.restoreOriginalSelectOptions(originalSelect);\n\t\t\t}\n\t\t\t\n\t\t\t\/\/ Clear all selections first\n\t\t\tArray.from(originalSelect.options).forEach(option => {\n\t\t\t\toption.selected = false;\n\t\t\t});\n\t\t\t\n\t\t\t\/\/ Set selected options\n\t\t\tthis.selectedValues.forEach(value => {\n\t\t\t\t\/\/ Try exact match first\n\t\t\t\tlet option = originalSelect.querySelector(`option[value=\"${value}\"]`);\n\t\t\t\t\n\t\t\t\t\/\/ If not found, try to find by text content (trimmed)\n\t\t\t\tif (!option) {\n\t\t\t\t\tconst options = Array.from(originalSelect.options);\n\t\t\t\t\toption = options.find(opt => opt.textContent.trim() === value.trim());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\/\/ If still not found, try to find by value (trimmed)\n\t\t\t\tif (!option) {\n\t\t\t\t\tconst options = Array.from(originalSelect.options);\n\t\t\t\t\toption = options.find(opt => opt.value.trim() === value.trim());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (option) {\n\t\t\t\t\toption.selected = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\/\/ Force trigger change event for multiple select\n\t\t\tconst changeEvent = new Event('change', { bubbles: true });\n\t\t\toriginalSelect.dispatchEvent(changeEvent);\n\t\t\t\n\t\t\t\/\/ Also trigger input event for better compatibility\n\t\t\tconst inputEvent = new Event('input', { bubbles: true });\n\t\t\toriginalSelect.dispatchEvent(inputEvent);\n\t\t\t\n\t\t\t\/\/ Trigger custom event for Fluent Forms\n\t\t\tconst fluentEvent = new CustomEvent('fluentform:field:change', { \n\t\t\t\tbubbles: true, \n\t\t\t\tdetail: { \n\t\t\t\t\tfield: originalSelect,\n\t\t\t\t\tvalue: this.selectedValues \n\t\t\t\t} \n\t\t\t});\n\t\t\toriginalSelect.dispatchEvent(fluentEvent);\n\t\t} else {\n\t\t\tconst originalSelect = this.originalSelectElement || this.originalSelect;\n\t\t\toriginalSelect.value = this.selectedValue;\n\t\t}\n\t}\n\t\n\trestoreOriginalSelectOptions(originalSelect) {\n\t\t\/\/ Clear existing options first\n\t\toriginalSelect.innerHTML = '';\n\t\t\n\t\t\/\/ Restore from stored original options\n\t\tthis.originalOptions.forEach(optData => {\n\t\t\tconst option = document.createElement('option');\n\t\t\toption.value = optData.value;\n\t\t\toption.textContent = optData.text;\n\t\t\toption.selected = optData.selected;\n\t\t\t\n\t\t\t\/\/ Add to original select\n\t\t\toriginalSelect.appendChild(option);\n\t\t});\n\t}\n\t\n\ttriggerChangeEvent() {\n\t\t\/\/ Create and dispatch change event\n\t\tconst originalSelect = this.originalSelectElement || this.originalSelect;\n\t\tconst event = new Event('change', { bubbles: true });\n\t\toriginalSelect.dispatchEvent(event);\n\t}\n\t\n\t\/\/ Public methods\n\tsetValue(value) {\n\t\tif (this.isMultiple) {\n\t\t\t\/\/ For multiple select, value should be an array\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\/\/ Clear current selections\n\t\t\t\tthis.selectedValues = [];\n\t\t\t\tthis.selectedTexts = [];\n\t\t\t\t\n\t\t\t\t\/\/ Add new selections\n\t\t\t\tconst originalSelect = this.originalSelectElement || this.originalSelect;\n\t\t\t\tvalue.forEach(val => {\n\t\t\t\t\tconst option = originalSelect.querySelector(`option[value=\"${val}\"]`);\n\t\t\t\t\tif (option) {\n\t\t\t\t\t\tthis.selectedValues.push(option.value);\n\t\t\t\t\t\tthis.selectedTexts.push(option.textContent);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\/\/ Update display and original select\n\t\t\t\tthis.updateDisplay();\n\t\t\t\tthis.updateOriginalSelect();\n\t\t\t\tthis.createOptions(); \/\/ Recreate options to update visual state\n\t\t\t}\n\t\t} else {\n\t\t\tconst originalSelect = this.originalSelectElement || this.originalSelect;\n\t\t\tconst option = originalSelect.querySelector(`option[value=\"${value}\"]`);\n\t\t\tif (option) {\n\t\t\t\tthis.selectOption(option.value, option.textContent);\n\t\t\t}\n\t\t}\n\t}\n\t\n\tgetValue() {\n\t\tif (this.isMultiple) {\n\t\t\treturn this.selectedValues;\n\t\t} else {\n\t\t\treturn this.selectedValue;\n\t\t}\n\t}\n\t\n\tdisable() {\n\t\tthis.input.classList.add('haipe-custom-select__input--disabled');\n\t\tthis.input.disabled = true;\n\t\tconst originalSelect = this.originalSelectElement || this.originalSelect;\n\t\toriginalSelect.disabled = true;\n\t}\n\t\n\tenable() {\n\t\tthis.input.classList.remove('haipe-custom-select__input--disabled');\n\t\tthis.input.disabled = false;\n\t\tconst originalSelect = this.originalSelectElement || this.originalSelect;\n\t\toriginalSelect.disabled = false;\n\t}\n}\n\n\/\/ Function to wait for element to exist\nfunction waitForElement(selector, callback, maxWaitTime = 10000) {\n\tconst startTime = Date.now();\n\t\n\tfunction checkElement() {\n\t\tconst element = document.querySelector(selector);\n\t\t\n\t\tif (element) {\n\t\t\tcallback(element);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\/\/ Check if we've exceeded max wait time\n\t\tif (Date.now() - startTime > maxWaitTime) {\n\t\t\tconsole.warn(`Element ${selector} not found after ${maxWaitTime}ms`);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\/\/ Check again in 100ms\n\t\tsetTimeout(checkElement, 100);\n\t}\n\t\n\tcheckElement();\n}\n\n\/\/ Function to initialize custom selects when DOM is ready\ndocument.addEventListener('DOMContentLoaded', function() {\n\tinitializeCustomSelects();\n\tinitializeSuccessMessage();\n\thandleSubjectParameter();\n\tinterceptSubjectLinks();\n\tinterceptFormSubmission();\n});\n\n\/\/ Function to intercept form submission and ensure sync\nfunction interceptFormSubmission() {\n\t\/\/ Listen for form submission\n\tdocument.addEventListener('submit', function(event) {\n\t\tconst form = event.target;\n\t\t\n\t\t\/\/ Check if it's a Fluent Forms form\n\t\tif (form.closest('.fluentform')) {\n\t\t\t\/\/ Force sync all custom selects before submission\n\t\t\tconst customSelects = form.querySelectorAll('select[data-custom-select-initialized=\"true\"]');\n\t\t\tcustomSelects.forEach(select => {\n\t\t\t\tif (select.customSelectInstance) {\n\t\t\t\t\tselect.customSelectInstance.updateOriginalSelect();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}, true); \/\/ Use capture phase to intercept before Fluent Forms\n}\n\n\t\/\/ Function to initialize custom selects\nfunction initializeCustomSelects() {\n\t\/\/ Find all select elements in Fluent Forms\n\tconst fluentFormSelects = document.querySelectorAll('.fluentform select');\n\t\n\tfluentFormSelects.forEach(select => {\n\t\t\/\/ Check if it's not already converted\n\t\tif (!select.dataset.customSelectInitialized) {\n\t\t\tselect.dataset.customSelectInitialized = 'true';\n\t\t\t\n\t\t\t\/\/ For multiple selects, completely disable Choices.js\n\t\t\tif (select.hasAttribute('multiple')) {\n\t\t\t\t\/\/ Find and hide all Choices.js related elements\n\t\t\t\tconst choicesContainer = select.closest('.choices');\n\t\t\t\tif (choicesContainer) {\n\t\t\t\t\tchoicesContainer.style.display = 'none';\n\t\t\t\t\tchoicesContainer.style.visibility = 'hidden';\n\t\t\t\t\tchoicesContainer.style.opacity = '0';\n\t\t\t\t\tchoicesContainer.style.position = 'absolute';\n\t\t\t\t\tchoicesContainer.style.left = '-9999px';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\/\/ Also hide any other Choices.js elements that might exist\n\t\t\t\tconst choicesElements = document.querySelectorAll('.choices[data-type*=\"select-multiple\"]');\n\t\t\t\tchoicesElements.forEach(el => {\n\t\t\t\t\tel.style.display = 'none';\n\t\t\t\t\tel.style.visibility = 'hidden';\n\t\t\t\t\tel.style.opacity = '0';\n\t\t\t\t\tel.style.position = 'absolute';\n\t\t\t\t\tel.style.left = '-9999px';\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\/\/ Ensure the original select is visible for our custom select to work with\n\t\t\t\tselect.style.display = 'block';\n\t\t\t\tselect.style.visibility = 'visible';\n\t\t\t\tselect.style.opacity = '1';\n\t\t\t\tselect.style.position = 'static';\n\t\t\t\tselect.style.left = 'auto';\n\t\t\t}\n\t\t\t\n\t\t\t\/\/ Get placeholder text - check for Fluent Forms placeholder or first option if it's a placeholder\n\t\t\tlet placeholderText = select.dataset.placeholder || select.getAttribute('placeholder') || 'Select...';\n\t\t\t\n\t\t\t\/\/ Check if first option is a placeholder (common in Fluent Forms)\n\t\t\tif (select.options[0] && (select.options[0].value === '' || select.options[0].disabled)) {\n\t\t\t\tplaceholderText = select.options[0].textContent;\n\t\t\t}\n\t\t\t\n\t\t\t\/\/ Create custom select instance\n\t\t\tconst customSelect = new HaipeCustomSelect(select, {\n\t\t\t\tallowCustom: false,\n\t\t\t\tplaceholder: placeholderText\n\t\t\t});\n\t\t\t\n\t\t\t\/\/ Store reference for potential external access\n\t\t\tselect.customSelectInstance = customSelect;\n\t\t}\n\t});\n}\n\n\t\/\/ Function to initialize custom selects for dynamically added forms\nwindow.initializeHaipeCustomSelects = function() {\n\t\/\/ Wait for Fluent Forms to be ready\n\twaitForElement('.fluentform', function() {\n\t\tconst fluentFormSelects = document.querySelectorAll('.fluentform select:not([data-custom-select-initialized])');\n\t\t\n\t\tfluentFormSelects.forEach(select => {\n\t\t\tselect.dataset.customSelectInitialized = 'true';\n\t\t\t\n\t\t\t\/\/ For multiple selects, completely disable Choices.js\n\t\t\tif (select.hasAttribute('multiple')) {\n\t\t\t\t\/\/ Find and hide all Choices.js related elements\n\t\t\t\tconst choicesContainer = select.closest('.choices');\n\t\t\t\tif (choicesContainer) {\n\t\t\t\t\tchoicesContainer.style.display = 'none';\n\t\t\t\t\tchoicesContainer.style.visibility = 'hidden';\n\t\t\t\t\tchoicesContainer.style.opacity = '0';\n\t\t\t\t\tchoicesContainer.style.position = 'absolute';\n\t\t\t\t\tchoicesContainer.style.left = '-9999px';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\/\/ Also hide any other Choices.js elements that might exist\n\t\t\t\tconst choicesElements = document.querySelectorAll('.choices[data-type*=\"select-multiple\"]');\n\t\t\t\tchoicesElements.forEach(el => {\n\t\t\t\t\tel.style.display = 'none';\n\t\t\t\t\tel.style.visibility = 'hidden';\n\t\t\t\t\tel.style.opacity = '0';\n\t\t\t\t\tel.style.position = 'absolute';\n\t\t\t\t\tel.style.left = '-9999px';\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\/\/ Ensure the original select is visible for our custom select to work with\n\t\t\t\tselect.style.display = 'block';\n\t\t\t\tselect.style.visibility = 'visible';\n\t\t\t\tselect.style.opacity = '1';\n\t\t\t\tselect.style.position = 'static';\n\t\t\t\tselect.style.left = 'auto';\n\t\t\t}\n\t\t\t\n\t\t\t\/\/ Get placeholder text - check for Fluent Forms placeholder or first option if it's a placeholder\n\t\t\tlet placeholderText = select.dataset.placeholder || select.getAttribute('placeholder') || 'Select...';\n\t\t\t\n\t\t\t\/\/ Check if first option is a placeholder (common in Fluent Forms)\n\t\t\tif (select.options[0] && (select.options[0].value === '' || select.options[0].disabled)) {\n\t\t\t\tplaceholderText = select.options[0].textContent;\n\t\t\t}\n\t\t\t\n\t\t\tconst customSelect = new HaipeCustomSelect(select, {\n\t\t\t\tallowCustom: false,\n\t\t\t\tplaceholder: placeholderText\n\t\t\t});\n\t\t\t\n\t\t\tselect.customSelectInstance = customSelect;\n\t\t});\n\t});\n};\n\n\/\/ Listen for Fluent Forms dynamic content\nif (typeof jQuery !== 'undefined') {\n\tjQuery(document).on('fluentform_loaded', function() {\n\t\t\/\/ Wait a bit for the DOM to be fully updated\n\t\tsetTimeout(function() {\n\t\t\twindow.initializeHaipeCustomSelects();\n\t\t\thandleSubjectParameter(); \/\/ Also handle subject parameter for dynamically loaded forms\n\t\t}, 100);\n\t});\n}\n\n\/\/ Function to initialize success message functionality\nfunction initializeSuccessMessage() {\n\t\/\/ Watch for success message appearance\n\tconst observer = new MutationObserver(function(mutations) {\n\t\tmutations.forEach(function(mutation) {\n\t\t\tmutation.addedNodes.forEach(function(node) {\n\t\t\t\tif (node.nodeType === 1 && node.classList && node.classList.contains('ff-message-success')) {\n\t\t\t\t\tsetupSuccessMessage(node);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n\n\t\/\/ Start observing\n\tobserver.observe(document.body, {\n\t\tchildList: true,\n\t\tsubtree: true\n\t});\n}\n\n\/\/ Function to setup success message with button functionality\nfunction setupSuccessMessage(successElement) {\n\t\/\/ Find the submit again button\n\tconst submitAgainBtn = successElement.querySelector('#resendFormBtn');\n\t\n\tif (submitAgainBtn) {\n\t\tsubmitAgainBtn.addEventListener('click', function(e) {\n\t\t\te.preventDefault();\n\t\t\t\n\t\t\tconsole.log('Submit Again button clicked');\n\t\t\t\n\t\t\t\/\/ Hide the success message\n\t\t\tsuccessElement.style.display = 'none';\n\t\t\t\n\t\t\t\/\/ Find the form container\n\t\t\tconst formContainer = successElement.closest('.fluentform');\n\t\t\tif (formContainer) {\n\t\t\t\tconsole.log('Form container found:', formContainer);\n\t\t\t\t\n\t\t\t\t\/\/ Remove success state classes that might be hiding the form\n\t\t\t\tformContainer.classList.remove('ff-form-success', 'ff-submission-success');\n\t\t\t\t\n\t\t\t\t\/\/ Try to use Fluent Forms native reset if available\n\t\t\t\tif (window.FluentForm && formContainer.dataset.formId) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst formId = formContainer.dataset.formId;\n\t\t\t\t\t\tconsole.log('Trying Fluent Forms native reset for form ID:', formId);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\/\/ Try to trigger a native reset\n\t\t\t\t\t\tif (window.FluentForm.resetForm) {\n\t\t\t\t\t\t\twindow.FluentForm.resetForm(formId);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.log('Native reset failed:', error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\/\/ Check what elements exist in the form container\n\t\t\t\tconst allElements = formContainer.querySelectorAll('*');\n\t\t\t\tconsole.log('All elements in form container:', allElements.length);\n\t\t\t\t\n\t\t\t\t\/\/ Look for hidden elements\n\t\t\t\tconst hiddenElements = formContainer.querySelectorAll('[style*=\"display: none\"], [style*=\"display:none\"], .hidden');\n\t\t\t\tconsole.log('Hidden elements found:', hiddenElements);\n\t\t\t\t\n\t\t\t\t\/\/ Try to find the original form\n\t\t\t\tconst form = formContainer.querySelector('form');\n\t\t\t\tif (form) {\n\t\t\t\t\tconsole.log('Form element found:', form);\n\t\t\t\t\tform.style.display = 'block';\n\t\t\t\t\tform.reset();\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log('No form element found');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\/\/ Try to show all form-related elements that might be hidden\n\t\t\t\tconst formElements = formContainer.querySelectorAll('.ff-el-form, .ff-el-group, .ff-el-input, .ff_submit_btn_wrapper');\n\t\t\t\tconsole.log('Form elements found:', formElements);\n\t\t\t\t\n\t\t\t\tformElements.forEach(element => {\n\t\t\t\t\tif (element !== successElement) {\n\t\t\t\t\t\tconsole.log('Showing element:', element);\n\t\t\t\t\t\telement.style.display = 'block';\n\t\t\t\t\t\telement.style.visibility = 'visible';\n\t\t\t\t\t\telement.style.opacity = '1';\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\/\/ Also try to remove any hidden classes\n\t\t\t\tformContainer.querySelectorAll('.hidden, .ff-hidden, .ff-el-hidden').forEach(el => {\n\t\t\t\t\tel.classList.remove('hidden', 'ff-hidden', 'ff-el-hidden');\n\t\t\t\t\tel.style.display = 'block';\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\/\/ Force show all form elements with important CSS\n\t\t\t\tconst allFormElements = formContainer.querySelectorAll('[class*=\"ff-el-\"]');\n\t\t\t\tallFormElements.forEach(el => {\n\t\t\t\t\tif (el !== successElement && !el.classList.contains('ff-message-success')) {\n\t\t\t\t\t\tel.style.setProperty('display', 'block', 'important');\n\t\t\t\t\t\tel.style.setProperty('visibility', 'visible', 'important');\n\t\t\t\t\t\tel.style.setProperty('opacity', '1', 'important');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\/\/ Try to trigger a form reset event\n\t\t\t\tconst resetEvent = new Event('reset', { bubbles: true });\n\t\t\t\tif (form) {\n\t\t\t\t\tform.dispatchEvent(resetEvent);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\/\/ Alternative: try to reload the form using Fluent Forms events\n\t\t\t\tif (typeof jQuery !== 'undefined') {\n\t\t\t\t\tjQuery(document).trigger('fluentform_reset', [formContainer]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\/\/ Ensure all original select elements are properly hidden\n\t\t\t\tconst allSelects = formContainer.querySelectorAll('select');\n\t\t\t\tallSelects.forEach(select => {\n\t\t\t\t\tif (select.hasAttribute('multiple')) {\n\t\t\t\t\t\t\/\/ For multiple selects, keep accessible but visually hidden\n\t\t\t\t\t\tselect.style.position = 'absolute';\n\t\t\t\t\t\tselect.style.left = '-9999px';\n\t\t\t\t\t\tselect.style.opacity = '0';\n\t\t\t\t\t\tselect.style.pointerEvents = 'none';\n\t\t\t\t\t\tselect.style.zIndex = '-1';\n\t\t\t\t\t\tselect.style.visibility = 'hidden';\n\t\t\t\t\t\tselect.style.display = 'block'; \/\/ Keep in DOM for form submission\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\/\/ For single selects, hide completely\n\t\t\t\t\t\tselect.style.display = 'none';\n\t\t\t\t\t\tselect.style.visibility = 'hidden';\n\t\t\t\t\t\tselect.style.opacity = '0';\n\t\t\t\t\t\tselect.style.position = 'absolute';\n\t\t\t\t\t\tselect.style.left = '-9999px';\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tconsole.log('Form reset completed');\n\t\t\t}\n\t\t});\n\t}\n}\n\n\/\/ Function to intercept subject links and prevent page reload\nfunction interceptSubjectLinks() {\n\t\/\/ Listen for clicks on links with subject parameter\n\tdocument.addEventListener('click', function(event) {\n\t\tconst link = event.target.closest('a[href*=\"subject=\"]');\n\t\t\n\t\tif (link && link.href.includes('subject=')) {\n\t\t\t\/\/ Prevent default link behavior (page reload)\n\t\t\tevent.preventDefault();\n\t\t\t\n\t\t\t\/\/ Extract subject parameter from URL\n\t\t\tconst url = new URL(link.href);\n\t\t\tconst subjectParam = url.searchParams.get('subject');\n\t\t\t\n\t\t\tif (subjectParam) {\n\t\t\t\t\/\/ Update current page URL without reload\n\t\t\t\tupdateUrlParameter('subject', subjectParam);\n\t\t\t\t\n\t\t\t\t\/\/ Scroll to form if there's a hash\n\t\t\t\tif (url.hash) {\n\t\t\t\t\tconst targetElement = document.querySelector(url.hash);\n\t\t\t\t\tif (targetElement) {\n\t\t\t\t\t\ttargetElement.scrollIntoView({ behavior: 'smooth' });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\/\/ Handle subject parameter\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\thandleSubjectParameter();\n\t\t\t\t}, 100);\n\t\t\t}\n\t\t}\n\t});\n}\n\n\/\/ Function to update URL parameter without page reload\nfunction updateUrlParameter(param, value) {\n\tconst currentUrl = new URL(window.location);\n\t\n\tif (value) {\n\t\tcurrentUrl.searchParams.set(param, value);\n\t} else {\n\t\tcurrentUrl.searchParams.delete(param);\n\t}\n\t\n\t\/\/ Update URL without page reload\n\twindow.history.pushState({}, '', currentUrl.toString());\n\t\n\t\/\/ Update data attribute\n\tconst formContent = document.querySelector('.contact-form-block__form-content');\n\tif (formContent) {\n\t\tif (value) {\n\t\t\tformContent.setAttribute('data-subject-param', value);\n\t\t} else {\n\t\t\tformContent.removeAttribute('data-subject-param');\n\t\t}\n\t}\n}\n\n\/\/ Function to handle subject parameter from URL\nfunction handleSubjectParameter() {\n\t\/\/ Find form content with subject parameter\n\tconst formContent = document.querySelector('.contact-form-block__form-content[data-subject-param]');\n\t\n\tif (!formContent) {\n\t\treturn; \/\/ No subject parameter found\n\t}\n\t\n\tconst subjectParam = formContent.getAttribute('data-subject-param');\n\t\n\t\/\/ Wait for FluentForm to be ready and custom selects to be initialized\n\twaitForElement('.fluentform', function() {\n\t\tsetTimeout(function() {\n\t\t\t\/\/ Find all select elements in the form\n\t\t\tconst formSelects = formContent.querySelectorAll('.fluentform select');\n\t\t\t\n\t\t\tformSelects.forEach(function(select) {\n\t\t\t\t\n\t\t\t\t\/\/ Look for select with options that match our subject value\n\t\t\t\tconst options = Array.from(select.options);\n\t\t\t\tconst matchingOption = options.find(option => {\n\t\t\t\t\tconst optionValue = option.value.trim();\n\t\t\t\t\t\n\t\t\t\t\t\/\/ Match only with the option value (exact match)\n\t\t\t\t\treturn optionValue === subjectParam;\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tif (matchingOption && matchingOption.value !== '') {\t\t\t\t\t\n\t\t\t\t\t\/\/ Set the original select value\n\t\t\t\t\tselect.value = matchingOption.value;\n\t\t\t\t\t\n\t\t\t\t\t\/\/ If custom select is already initialized, update it\n\t\t\t\t\tif (select.customSelectInstance) {\n\t\t\t\t\t\tselect.customSelectInstance.setValue(matchingOption.value);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\/\/ If not initialized yet, wait a bit and try again\n\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\tif (select.customSelectInstance) {\n\t\t\t\t\t\t\t\tselect.customSelectInstance.setValue(matchingOption.value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 500);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\/\/ Trigger change event to notify any other scripts\n\t\t\t\t\tconst changeEvent = new Event('change', { bubbles: true });\n\t\t\t\t\tselect.dispatchEvent(changeEvent);\n\t\t\t\t}\n\t\t\t});\n\t\t}, 200);\n\t});\n}\n\n\/\/ Listen for Fluent Forms events to handle form reset and validation\nif (typeof jQuery !== 'undefined') {\n\tjQuery(document).on('fluentform_submission_completed', function(event, data) {\n\t\t\/\/ Store reference to the form for potential reset\n\t\tif (data && data.form) {\n\t\t\tdata.form.haipeFormData = {\n\t\t\t\toriginalForm: data.form.querySelector('form'),\n\t\t\t\tformElements: data.form.querySelectorAll('.ff-el-form, .ff-el-group')\n\t\t\t};\n\t\t}\n\t});\n\t\n\t\/\/ Listen for form validation events\n\tjQuery(document).on('fluentform_validation_start', function(event, form) {\n\t\t\/\/ Force sync all custom selects before validation\n\t\tconst customSelects = form.querySelectorAll('select[data-custom-select-initialized=\"true\"]');\n\t\tcustomSelects.forEach(select => {\n\t\t\tif (select.customSelectInstance) {\n\t\t\t\tselect.customSelectInstance.updateOriginalSelect();\n\t\t\t}\n\t\t});\n\t});\n\t\n\t\/\/ Listen for field validation\n\tjQuery(document).on('fluentform_field_validation', function(event, field, errors) {\n\t\tif (field.tagName === 'SELECT' && field.hasAttribute('multiple')) {\n\t\t\t\/\/ Check if the field has a custom select instance\n\t\t\tif (field.customSelectInstance) {\n\t\t\t\tconst selectedValues = field.customSelectInstance.getValue();\n\t\t\t\t\n\t\t\t\t\/\/ If we have values but validation fails, force sync\n\t\t\t\tif (selectedValues && selectedValues.length > 0) {\n\t\t\t\t\tfield.customSelectInstance.updateOriginalSelect();\n\t\t\t\t\t\n\t\t\t\t\t\/\/ Trigger validation again\n\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\tjQuery(field).trigger('change');\n\t\t\t\t\t}, 100);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n<\/script>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"folder":[],"class_list":["post-38","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/haipestudio.buzzvel.work\/en\/wp-json\/wp\/v2\/pages\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haipestudio.buzzvel.work\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/haipestudio.buzzvel.work\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/haipestudio.buzzvel.work\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haipestudio.buzzvel.work\/en\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":0,"href":"https:\/\/haipestudio.buzzvel.work\/en\/wp-json\/wp\/v2\/pages\/38\/revisions"}],"wp:attachment":[{"href":"https:\/\/haipestudio.buzzvel.work\/en\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"folder","embeddable":true,"href":"https:\/\/haipestudio.buzzvel.work\/en\/wp-json\/wp\/v2\/folder?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}