{"id":38,"date":"2025-11-14T18:32:27","date_gmt":"2025-11-14T09:32:27","guid":{"rendered":"https:\/\/yae-japan.com\/wp2025\/?page_id=38"},"modified":"2026-01-06T16:49:00","modified_gmt":"2026-01-06T07:49:00","slug":"otoiawase","status":"publish","type":"page","link":"https:\/\/yae-japan.com\/th\/otoiawase\/","title":{"rendered":"\u0e15\u0e34\u0e14\u0e15\u0e48\u0e2d\u0e40\u0e23\u0e32"},"content":{"rendered":"    <div class=\"yae_contact_wrap\">\n        <form action=\"https:\/\/yae-japan.com\/th\/otoiawase\/?action=contact_confirm\" method=\"POST\" >\n            <table class=\"contactTbl\">\n                <tbody>\n                    <tr>\n                        <th>Name<span class=\"hissu\">*<\/span><\/th>\n                        <td>\n                            <input type=\"text\" name=\"contactName\" size=\"60\" value=\"\">\n                            <span class=\"error-msg\"><\/span>\n                        <\/td>\n                    <\/tr>\n                    <tr>\n                        <th>Email Adrress<span class=\"hissu\">*<\/span><\/th>\n                        <td>\n                            <input type=\"text\" name=\"contactEmail\" size=\"60\" value=\"\">\n                            <span class=\"error-msg\"><\/span>\n                        <\/td>\n                    <\/tr>\n                    <tr>\n                        <th>Email Address (Please re-type to confirm)<span class=\"hissu\">*<\/span><\/th>\n                        <td>\n                            <input type=\"text\" name=\"contactEmail2\" size=\"60\" value=\"\">\n                            <span class=\"error-msg\"><\/span>\n                        <\/td>\n                    <\/tr>\n                    <tr>\n                        <th>Contact Information<span class=\"hissu\">*<\/span><\/th>\n                        <td>\n                            <div>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactInformation\" value=\"contactinfo_telephone\">\n                                        <span class=\"radio-field-text\">reservation.contactinfo_telephone<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactInformation\" value=\"contactinfo_line\">\n                                        <span class=\"radio-field-text\">reservation.contactinfo_line<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactInformation\" value=\"contactinfo_wechat\">\n                                        <span class=\"radio-field-text\">reservation.contactinfo_wechat<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactInformation\" value=\"contactinfo_whatsapp\">\n                                        <span class=\"radio-field-text\">reservation.contactinfo_whatsapp<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <input type=\"hidden\" name=\"__children[contactInformation][]\" value=\"{&quot;\\u96fb\\u8a71\\u756a\\u53f7&quot;:&quot;\\u96fb\\u8a71\\u756a\\u53f7&quot;,&quot;Line ID&quot;:&quot;Line ID&quot;,&quot;WeChat ID&quot;:&quot;WeChat ID&quot;,&quot;Whatsapp ID&quot;:&quot;Whatsapp ID&quot;}\">\n                            <\/div>\n                            <p>\n                                <input type=\"text\" name=\"contactInformationText\" size=\"60\" value=\"\">\n                            <\/p>\n                            <span class=\"error-msg\"><\/span>\n                        <\/td>\n                    <\/tr>\n                    <tr>\n                        <th>Country\/region of passport<span class=\"hissu\">*<\/span><\/th>\n                        <td>\n                            <div>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_ja\">\n                                        <span class=\"radio-field-text\">reservation.region_ja<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_ch\">\n                                        <span class=\"radio-field-text\">reservation.region_ch<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_tw\">\n                                        <span class=\"radio-field-text\">reservation.region_tw<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_hk\">\n                                        <span class=\"radio-field-text\">reservation.region_hk<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_ko\">\n                                        <span class=\"radio-field-text\">reservation.region_ko<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_sg\">\n                                        <span class=\"radio-field-text\">reservation.region_sg<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_id\">\n                                        <span class=\"radio-field-text\">reservation.region_id<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_th\">\n                                        <span class=\"radio-field-text\">reservation.region_th<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_us\">\n                                        <span class=\"radio-field-text\">reservation.region_us<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_can\">\n                                        <span class=\"radio-field-text\">reservation.region_can<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_au\">\n                                        <span class=\"radio-field-text\">reservation.region_au<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_mys\">\n                                        <span class=\"radio-field-text\">reservation.region_mys<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_phl\">\n                                        <span class=\"radio-field-text\">reservation.region_phl<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_gbr\">\n                                        <span class=\"radio-field-text\">reservation.region_gbr<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_ita\">\n                                        <span class=\"radio-field-text\">reservation.region_ita<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_fra\">\n                                        <span class=\"radio-field-text\">reservation.region_fra<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_deu\">\n                                        <span class=\"radio-field-text\">reservation.region_deu<\/span>\n                                    <\/label>\n                                <\/span>\n                                                                <span class=\"radio-field horizontal-item\">\n                                    <label>\n                                        <input type=\"radio\" name=\"contactRegion\" value=\"region_other\">\n                                        <span class=\"radio-field-text\">reservation.region_other<\/span>\n                                    <\/label>\n                                <\/span>\n                                                            <\/div>\n                            <p>\n                                <input type=\"text\" name=\"contactRegionText\" size=\"18\" value=\"\">\n                            <\/p>\n                            <span class=\"error-msg\"><\/span>\n                        <\/td>\n                    <\/tr>\n                    <tr>\n                        <th>Message<span class=\"hissu\">*<\/span><\/th>\n                        <td>\n                            <textarea name=\"contactMessage\" cols=\"50\" rows=\"5\"><\/textarea>\n                            <span class=\"error-msg\"><\/span>\n                        <\/td>\n                    <\/tr>\n                <\/tbody>\n            <\/table>\n            <div class=\"submit\">\n                <input type=\"submit\" name=\"submitConfirm\" value=\"Recheck information\" disabled style=\"opacity: 0.5;\">\n            <\/div>\n        <\/form>\n    <\/div>\n\n<script>\n    document.addEventListener('DOMContentLoaded', function() {\n        const form = document.querySelector('form[action*=\"contact_confirm\"]');\n        const submitBtn = form.querySelector('input[name=\"submitConfirm\"]');\n        const touchedFields = new Set();\n\n        const displayError = (fieldName, message) => {\n            const field = form.querySelector(`[name=\"${fieldName}\"]`);\n            if (!field) return;\n\n            \/\/ \u3010\u4fee\u6b63\u30dd\u30a4\u30f3\u30c8\u3011touchedFields\u306b\u7121\u304f\u3066\u3082\u3001\u4ed6\u306e\u9805\u76ee\u304c\u5165\u529b\u6e08\u307f\u306a\u306e\u306b\n            \/\/ \u3053\u3053\u304c\u672a\u5165\u529b\u306a\u3089\u8868\u793a\u5bfe\u8c61\u3068\u3059\u308b\uff08\u307e\u305f\u306f\u5168\u3066\u306e\u9805\u76ee\u3092\u30c1\u30a7\u30c3\u30af\u5bfe\u8c61\u306b\u3059\u308b\uff09\n            if (!touchedFields.has(fieldName)) return;\n\n            const errorDisplay = field.closest('td').querySelector('.error-msg');\n            if (errorDisplay) {\n                errorDisplay.textContent = message;\n                errorDisplay.style.color = 'red';\n                errorDisplay.style.fontSize = '0.8em';\n                errorDisplay.style.display = 'block';\n                errorDisplay.style.marginTop = '5px';\n            }\n        };\n\n        const clearError = (fieldName) => {\n            const field = form.querySelector(`[name=\"${fieldName}\"]`);\n            if (!field) return;\n            const errorDisplay = field.closest('td').querySelector('.error-msg');\n            if (errorDisplay) {\n                errorDisplay.textContent = '';\n            }\n        };\n\n        function isValidEmailFormat(email) {\n            const regex = \/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\\.[a-zA-Z0-9-]+)*$\/;\n            return regex.test(email);\n        }\n\n        \/\/ --- \u8a31\u53ef\u3057\u306a\u3044\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u306e\u30ea\u30b9\u30c8 ---\n        const blacklistedEmails = ['exsample@exsample.com', 'test@test.com'];\n\n        function validateForm() {\n            let isValid = true;\n\n            \/\/ 1. \u304a\u540d\u524d\n            const name = form.querySelector('[name=\"contactName\"]');\n            if (!name.value.trim()) {\n                displayError('contactName', 'Please fill in all required fields.');\n                isValid = false;\n            } else {\n                clearError('contactName');\n            }\n\n            \/\/ 2. \u30e1\u30fc\u30eb\n            const email = form.querySelector('[name=\"contactEmail\"]');\n            const emailValue = email.value.trim().toLowerCase(); \/\/ \u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u305b\u305a\u6bd4\u8f03\n            if (!emailValue) {\n                displayError('contactEmail', 'Please fill in all required fields.');\n                isValid = false;\n            } else if (!isValidEmailFormat(emailValue)) {\n                displayError('contactEmail', 'Email address in invalid.');\n                isValid = false;\n            } else if (blacklistedEmails.includes(emailValue)) {\n                \/\/ \u3010\u8ffd\u52a0\u3011\u30d6\u30e9\u30c3\u30af\u30ea\u30b9\u30c8\u306e\u30c1\u30a7\u30c3\u30af\n                displayError('contactEmail', 'Invalid input.');\n                isValid = false;\n            } else {\n                clearError('contactEmail');\n            }\n        \n            \/\/ 3. \u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u78ba\u8a8d\u7528\n            const email2 = form.querySelector('[name=\"contactEmail2\"]');\n            const email2Value = email2.value.trim().toLowerCase();\n\n            if (emailValue !== email2Value) {\n                displayError('contactEmail2', 'The email address you entered does not match.');\n                isValid = false;\n            } else if (!email2Value) {\n                displayError('contactEmail2', 'Please fill in all required fields.');\n                isValid = false;\n            } else {\n                clearError('contactEmail2');\n            }\n\n            \/\/ 4. \u9023\u7d61\u5148\u30e9\u30b8\u30aa\n            const infoChecked = form.querySelector('[name=\"contactInformation\"]:checked');\n            if (!infoChecked) {\n                displayError('contactInformation', 'Please fill in all required fields.');\n                isValid = false;\n            } else {\n                clearError('contactInformation');\n            }\n\n            \/\/ 5. \u9023\u7d61\u5148\u30c6\u30ad\u30b9\u30c8\n            const infoText = form.querySelector('[name=\"contactInformationText\"]');\n            if (!infoText.value.trim()) {\n                displayError('contactInformationText', 'Please fill in all required fields.');\n                isValid = false;\n            } else {\n                clearError('contactInformationText');\n            }\n\n            \/\/ 6. \u5730\u57df\u30e9\u30b8\u30aa\n            const regionChecked = form.querySelector('[name=\"contactRegion\"]:checked');\n            if (!regionChecked) {\n                displayError('contactRegion', 'Please fill in all required fields.');\n                isValid = false;\n            } else {\n                clearError('contactRegion');\n            }\n\n            \/\/ 7. \u30e1\u30c3\u30bb\u30fc\u30b8\n            const msg = form.querySelector('[name=\"contactMessage\"]');\n            if (!msg.value.trim()) {\n                displayError('contactMessage', 'Please fill in all required fields.');\n                isValid = false;\n            } else {\n                clearError('contactMessage');\n            }\n\n            submitBtn.disabled = !isValid;\n            submitBtn.style.opacity = isValid ? \"1\" : \"0.5\";\n            submitBtn.style.cursor = isValid ? \"pointer\" : \"not-allowed\";\n        }\n\n        \/\/ \u30a4\u30d9\u30f3\u30c8\u8a2d\u5b9a\n        form.querySelectorAll('input, textarea').forEach(field => {\n            \/\/ \u5168\u3066\u306e\u8981\u7d20\u306b\u304a\u3044\u3066\u300c\u4e00\u5ea6\u30d5\u30a9\u30fc\u30ab\u30b9\u304c\u5f53\u305f\u3063\u305f\u3089\uff08\u89e6\u308c\u3088\u3046\u3068\u3057\u305f\u3089\uff09\u300dtouched\u3068\u3059\u308b\n            field.addEventListener('focus', () => {\n                touchedFields.add(field.name);\n            });\n\n            field.addEventListener('blur', () => {\n                touchedFields.add(field.name);\n                validateForm();\n            });\n\n            field.addEventListener('change', () => {\n                touchedFields.add(field.name);\n                validateForm();\n            });\n        });\n\n        form.addEventListener('input', validateForm);\n        validateForm();\n    });\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>\u0e1e\u0e19\u0e31\u0e01\u0e07\u0e32\u0e19\u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e2a\u0e37\u0e48\u0e2d\u0e2a\u0e32\u0e23\u0e20\u0e32\u0e29\u0e32\u0e2d\u0e31\u0e07\u0e01\u0e24\u0e29\u0e44\u0e14\u0e49\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e43\u0e2b\u0e49\u0e17\u0e48\u0e32\u0e19\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23\u0e17\u0e35\u0e48\u0e23\u0e32\u0e1a\u0e23\u0e37\u0e48\u0e19\u0e41\u0e25\u0e30\u0e2a\u0e30\u0e14\u0e27\u0e01\u0e2a\u0e1a\u0e32\u0e22\u0e17\u0e35\u0e48\u0e2a\u0e38\u0e14 \u0e17\u0e35\u0e48 Yae \u0e40\u0e23\u0e32\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23\u0e40\u0e0a\u0e48\u0e32\u0e0a\u0e38\u0e14\u0e01\u0e34\u0e42\u0e21\u0e42\u0e19\u0e41\u0e1a\u0e1a\u0e23\u0e32\u0e04\u0e32\u0e40\u0e14\u0e35\u0e22\u0e27\u0e08\u0e1a \u0e44\u0e21\u0e48\u0e21\u0e35\u0e04\u0e48\u0e32\u0e18\u0e23\u0e23\u0e21\u0e40\u0e19\u0e35\u0e22\u0e21\u0e41\u0e2d\u0e1a\u0e41\u0e1d\u0e07 \u0e42\u0e14\u0e22\u0e23\u0e27\u0e21\u0e0a\u0e38\u0e14\u0e01\u0e34\u0e42\u0e21\u0e42\u0e19 \u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e1b\u0e23\u0e30\u0e14\u0e31\u0e1a \u0e41\u0e25\u0e30\u0e23\u0e2d\u0e07\u0e40\u0e17\u0e49\u0e32\u0e44\u0e27\u0e49\u0e43\u0e2b\u0e49\u0e40\u0e23\u0e35\u0e22\u0e1a\u0e23\u0e49\u0e2d\u0e22\u0e41\u0e25\u0e49\u0e27! \u0e19\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e19\u0e35\u0e49 \u0e40\u0e23\u0e32\u0e22\u0e31\u0e07\u0e21\u0e35\u0e41\u0e1e\u0e47\u0e01\u0e40\u0e01\u0e08\u0e16\u0e48\u0e32\u0e22\u0e20\u0e32\u0e1e\u0e43\u0e2b\u0e49\u0e1a\u0e23\u0e34\u0e01\u0e32\u0e23\u0e42\u0e14\u0e22\u0e21\u0e35\u0e04\u0e48\u0e32\u0e43\u0e0a\u0e49\u0e08\u0e48\u0e32\u0e22\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21 \u0e1e\u0e27\u0e01\u0e40\u0e23\u0e32\u0e15\u0e31\u0e49\u0e07\u0e15\u0e32\u0e23\u0e2d\u0e17\u0e35\u0e48\u0e08\u0e30\u0e44\u0e14\u0e49\u0e15\u0e49\u0e2d\u0e19\u0e23\u0e31\u0e1a\u0e17\u0e38\u0e01\u0e17\u0e48\u0e32\u0e19\u0e41\u0e25\u0e30\u0e21\u0e2d\u0e1a\u0e1b\u0e23\u0e30\u0e2a\u0e1a\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e01\u0e32\u0e23\u0e2a\u0e27\u0e21\u0e0a\u0e38\u0e14\u0e01\u0e34\u0e42\u0e21\u0e42\u0e19\u0e17\u0e35\u0e48\u0e19\u0e48\u0e32\u0e1b\u0e23\u0e30\u0e17\u0e31\u0e1a\u0e43\u0e08\u0e44\u0e21\u0e48\u0e23\u0e39\u0e49\u0e25\u0e37\u0e21!<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":13,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-38","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/yae-japan.com\/th\/wp-json\/wp\/v2\/pages\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yae-japan.com\/th\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/yae-japan.com\/th\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/yae-japan.com\/th\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yae-japan.com\/th\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":7,"href":"https:\/\/yae-japan.com\/th\/wp-json\/wp\/v2\/pages\/38\/revisions"}],"predecessor-version":[{"id":14852,"href":"https:\/\/yae-japan.com\/th\/wp-json\/wp\/v2\/pages\/38\/revisions\/14852"}],"wp:attachment":[{"href":"https:\/\/yae-japan.com\/th\/wp-json\/wp\/v2\/media?parent=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}