{"id":17092,"date":"2024-03-14T13:29:54","date_gmt":"2024-03-14T07:59:54","guid":{"rendered":"https:\/\/creativebliss.in\/reboltpens\/?page_id=17092"},"modified":"2024-03-14T13:56:05","modified_gmt":"2024-03-14T08:26:05","slug":"test-2-form","status":"publish","type":"page","link":"https:\/\/www.reboltpens.com\/index.php\/test-2-form\/","title":{"rendered":"Test 2 &#8211; form"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"17092\" class=\"elementor elementor-17092\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4f33e71 e-flex e-con-boxed e-con e-parent\" data-id=\"4f33e71\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-562a163 elementor-widget elementor-widget-wd_contact_form_7\" data-id=\"562a163\" data-element_type=\"widget\" data-widget_type=\"wd_contact_form_7.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\n<div class=\"wpcf7 no-js\" id=\"wpcf7-f22-o1\" lang=\"en-US\" dir=\"ltr\">\n<div class=\"screen-reader-response\"><p role=\"status\" aria-live=\"polite\" aria-atomic=\"true\"><\/p> <ul><\/ul><\/div>\n<form action=\"\/index.php\/wp-json\/wp\/v2\/pages\/17092#wpcf7-f22-o1\" method=\"post\" class=\"wpcf7-form init\" aria-label=\"Contact form\" novalidate=\"novalidate\" data-status=\"init\">\n<div style=\"display: none;\">\n<input type=\"hidden\" name=\"_wpcf7\" value=\"22\" \/>\n<input type=\"hidden\" name=\"_wpcf7_version\" value=\"5.9.8\" \/>\n<input type=\"hidden\" name=\"_wpcf7_locale\" value=\"en_US\" \/>\n<input type=\"hidden\" name=\"_wpcf7_unit_tag\" value=\"wpcf7-f22-o1\" \/>\n<input type=\"hidden\" name=\"_wpcf7_container_post\" value=\"0\" \/>\n<input type=\"hidden\" name=\"_wpcf7_posted_data_hash\" value=\"\" \/>\n<\/div>\n<p><label> Your name<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"your-name\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text wpcf7-validates-as-required\" autocomplete=\"name\" aria-required=\"true\" aria-invalid=\"false\" value=\"\" type=\"text\" name=\"your-name\" \/><\/span> <\/label>\n<\/p>\n<p><label> Your email<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"your-email\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-email wpcf7-validates-as-required wpcf7-text wpcf7-validates-as-email\" autocomplete=\"email\" aria-required=\"true\" aria-invalid=\"false\" value=\"\" type=\"email\" name=\"your-email\" \/><\/span> <\/label>\n<\/p>\n<p><label> Subject<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"your-subject\"><input size=\"40\" maxlength=\"400\" class=\"wpcf7-form-control wpcf7-text wpcf7-validates-as-required\" aria-required=\"true\" aria-invalid=\"false\" value=\"\" type=\"text\" name=\"your-subject\" \/><\/span> <\/label>\n<\/p>\n<p><label> Your message (optional)<br \/>\n<span class=\"wpcf7-form-control-wrap\" data-name=\"your-message\"><textarea cols=\"40\" rows=\"10\" maxlength=\"2000\" class=\"wpcf7-form-control wpcf7-textarea\" aria-invalid=\"false\" name=\"your-message\"><\/textarea><\/span> <\/label>\n<\/p>\n<p><input class=\"wpcf7-form-control wpcf7-submit has-spinner\" type=\"submit\" value=\"Submit\" \/>\n<\/p><div class=\"wpcf7-response-output\" aria-hidden=\"true\"><\/div>\n<\/form>\n<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-605a32f elementor-widget elementor-widget-html\" data-id=\"605a32f\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<script>\r\ndocument.addEventListener('DOMContentLoaded', function() {\r\n    var form = document.getElementById('8546414'); \/\/ Replace '8546414' with the actual ID of your form\r\n\r\n    if (form) {\r\n        var section = document.getElementById('hidden-section'); \/\/ Replace 'hidden-section' with the actual ID of your section\r\n        if (section) {\r\n            section.style.display = 'none'; \/\/ Hide the section initially\r\n\r\n            form.addEventListener('submit', function(event) {\r\n                event.preventDefault(); \/\/ Prevent the default form submission\r\n                console.log('Form submitted');\r\n                var checkInterval = setInterval(function() {\r\n                    var responseOutput = document.querySelector('.wpcf7-response-output');\r\n                    if (responseOutput && responseOutput.textContent.includes('Thank you for your message. It has been sent.')) {\r\n                        clearInterval(checkInterval);\r\n                        section.style.display = 'block'; \/\/ Show the section after successful form submission\r\n                    }\r\n                }, 100); \/\/ Check every 100 milliseconds for the response output\r\n            });\r\n        } else {\r\n            console.error('Section not found');\r\n        }\r\n    } else {\r\n        console.error('Form not found');\r\n    }\r\n});\r\n<\/script>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-b14059e e-flex e-con-boxed e-con e-parent\" data-id=\"b14059e\" data-element_type=\"container\" id=\"hidden-section\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-59d31c0 e-con-full e-flex e-con e-child\" data-id=\"59d31c0\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-74d2aad elementor-widget elementor-widget-button\" data-id=\"74d2aad\" data-element_type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"#\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Click here<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-fdf5062 e-con-full e-flex e-con e-child\" data-id=\"fdf5062\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e004c7e elementor-widget elementor-widget-button\" data-id=\"e004c7e\" data-element_type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"#\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Click here<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-0985775 e-con-full e-flex e-con e-child\" data-id=\"0985775\" data-element_type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-74ec137 elementor-widget elementor-widget-button\" data-id=\"74ec137\" data-element_type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"#\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Click here<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Your name Your email Subject Your message (optional) Click here Click here Click here<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-17092","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.reboltpens.com\/index.php\/wp-json\/wp\/v2\/pages\/17092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reboltpens.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.reboltpens.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.reboltpens.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reboltpens.com\/index.php\/wp-json\/wp\/v2\/comments?post=17092"}],"version-history":[{"count":25,"href":"https:\/\/www.reboltpens.com\/index.php\/wp-json\/wp\/v2\/pages\/17092\/revisions"}],"predecessor-version":[{"id":17124,"href":"https:\/\/www.reboltpens.com\/index.php\/wp-json\/wp\/v2\/pages\/17092\/revisions\/17124"}],"wp:attachment":[{"href":"https:\/\/www.reboltpens.com\/index.php\/wp-json\/wp\/v2\/media?parent=17092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}