

{"id":735,"date":"2026-03-16T00:37:45","date_gmt":"2026-03-15T15:37:45","guid":{"rendered":"https:\/\/mygoodtree.org\/?page_id=735"},"modified":"2026-03-20T00:22:21","modified_gmt":"2026-03-19T15:22:21","slug":"my_apply","status":"publish","type":"page","link":"https:\/\/mygoodtree.org\/?page_id=735","title":{"rendered":"my_Apply"},"content":{"rendered":"    <div class=\"container my-4\">\n      <div class=\"row justify-content-center\">\n        <div class=\"col-md-8 col-lg-6\">\n          <div class=\"card shadow-sm\">\n            <div class=\"card-body\">\n              <h4 class=\"card-title mb-3\">ApplyForUse<\/h4>\n              <form id=\"maf-form\" method=\"post\" action=\"https:\/\/mygoodtree.org\/wp-admin\/admin-post.php\" novalidate>\n                <input type=\"hidden\" id=\"maf_nonce\" name=\"maf_nonce\" value=\"d796b52fba\" \/><input type=\"hidden\" name=\"_wp_http_referer\" value=\"\/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F735\" \/>                <input type=\"hidden\" name=\"action\" value=\"maf_submit\">\n                <div id=\"maf-alert\" class=\"alert alert-danger d-none\" role=\"alert\"><\/div>\n                <div class=\"mb-3\">\n                  <label class=\"form-label\">Name<\/label>\n                  <input name=\"maf_name\" type=\"text\" class=\"form-control\" required>\n                <\/div>\n                <div class=\"mb-3\">\n                  <label class=\"form-label\">Email<\/label>\n                  <input name=\"maf_email\" type=\"email\" class=\"form-control\" required>\n                <\/div>\n                <div class=\"mb-3\">\n                  <label class=\"form-label\">Phone<\/label>\n                  <input name=\"maf_phone\" type=\"text\" class=\"form-control\" required>\n                <\/div>\n                <button type=\"submit\" class=\"btn btn-primary btn-lg w-100\" style=\"font-size:1.5rem;\">Join<\/button>\n              <\/form>\n            <\/div>\n          <\/div>\n        <\/div>\n      <\/div>\n    <\/div>\n\n    <!-- Modal -->\n    <div class=\"modal fade\" id=\"mafModal\" tabindex=\"-1\" aria-hidden=\"true\">\n      <div class=\"modal-dialog modal-dialog-centered\">\n        <div class=\"modal-content\">\n          <div class=\"modal-body\" id=\"mafModalBody\"><\/div>\n        <\/div>\n      <\/div>\n    <\/div>\n\n    <script>\n    (function(){\n      \/\/ Helper: get URL param\n      function getParam(name){\n        var params = new URLSearchParams(window.location.search);\n        return params.get(name);\n      }\n\n      var form = document.getElementById('maf-form');\n      var alertBox = document.getElementById('maf-alert');\n\n      form.addEventListener('submit', function(e){\n        e.preventDefault();\n        alertBox.classList.add('d-none');\n        alertBox.textContent = '';\n\n        var name = form.querySelector('[name=maf_name]').value.trim();\n        var email = form.querySelector('[name=maf_email]').value.trim();\n        var phone = form.querySelector('[name=maf_phone]').value.trim();\n\n        if (!name || !email || !phone) {\n          alertBox.textContent = 'please, fill  Essentials';\n          alertBox.classList.remove('d-none');\n          return;\n        }\n\n        var emailRe = \/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/;\n        var phoneRe = \/^\\+?[0-9\\-\\s]{7,20}$\/;\n\n        if (!emailRe.test(email) || !phoneRe.test(phone)) {\n          alertBox.textContent = 'please, fill  Essentials';\n          alertBox.classList.remove('d-none');\n          return;\n        }\n\n        \/\/ All good: submit the form normally to admin-post.php\n        form.submit();\n      });\n\n      \/\/ On page load, check for success or error flags and show messages\n      document.addEventListener('DOMContentLoaded', function(){\n        var success = getParam('maf_success');\n        var error = getParam('maf_error');\n\n        if (error) {\n          if (error === 'essentials' || error === 'format') {\n            alert('please, fill  Essentials');\n          } else {\n            alert('Submission error, please try again.');\n          }\n        }\n\n        if (success === '1') {\n          var modalEl = document.getElementById('mafModal');\n          var modalBody = document.getElementById('mafModalBody');\n          modalBody.textContent = \"welcome, your Apply is completed.\\nWe will touch you as soon as\";\n          var bsModal = new bootstrap.Modal(modalEl);\n          bsModal.show();\n          setTimeout(function(){\n            window.location.href = \"https:\/\/mygoodtree.org\/\";\n          }, 3000);\n        }\n      });\n    })();\n    <\/script>\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template-fullwidth.php","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/mygoodtree.org\/index.php?rest_route=\/wp\/v2\/pages\/735"}],"collection":[{"href":"https:\/\/mygoodtree.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mygoodtree.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mygoodtree.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mygoodtree.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=735"}],"version-history":[{"count":2,"href":"https:\/\/mygoodtree.org\/index.php?rest_route=\/wp\/v2\/pages\/735\/revisions"}],"predecessor-version":[{"id":825,"href":"https:\/\/mygoodtree.org\/index.php?rest_route=\/wp\/v2\/pages\/735\/revisions\/825"}],"wp:attachment":[{"href":"https:\/\/mygoodtree.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=735"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}