
{"id":89,"date":"2017-03-24T05:09:56","date_gmt":"2017-03-24T05:09:56","guid":{"rendered":"http:\/\/pattan.org\/pdo\/v2b1\/?page_id=89"},"modified":"2017-05-15T10:39:39","modified_gmt":"2017-05-15T10:39:39","slug":"we-wan-to-hear-from-you","status":"publish","type":"page","link":"https:\/\/pattan.org\/pdo\/v2b1\/we-wan-to-hear-from-you\/","title":{"rendered":"We want to hear from you"},"content":{"rendered":"\r\n\t\r\r\n\t\r\r\n\t\t\t\t\t\t<form  name= \"wpdevart_frontend_form_1\" id='wpdevart-forms-1' class=\"wpdevart-forms default-skin forms-general-styling\" method='post'  action='' enctype='multipart\/form-data'>\r\r\n\t\r\r\n\t\t\t\t\t\t\r\n                                            <!--bfh-number -->\r\r\n                                            <div class=\"wpdevart-input-field \">\r\r\n                                                 \r\r\n                                                        <label>Name<\/label>\r\r\n                                                \r\n        \r\r\n                                                <div class=\"input-text input-field-inner\">\r\r\n                                                    \r\r\n                                                    <input  type=\"text\"  \r\r\n                                                            id =\"input-field-1\"\r\r\n                                                            name=\"label_1\"   required\r\n                                                            value=\"\" class=\"form-control  \" \r\r\n                                                            placeholder=\"Your Name\" \r\r\n                                                             \r\r\n                                                           \/>\r\r\n                                                <\/div>\r\r\n                                            <\/div>\r\r\n\t\t\t\t\t\t\t\t\t\t\r\n                                            <!--bfh-number -->\r\r\n                                            <div class=\"wpdevart-input-field \">\r\r\n                                                 \r\r\n                                                        <label>E-mail<\/label>\r\r\n                                                \r\n        \r\r\n                                                <div class=\"input-email input-field-inner\">\r\r\n                                                    \r\r\n                                                    <input  type=\"email\"  \r\r\n                                                            id =\"input-field-2\"\r\r\n                                                            name=\"label_2\"   required\r\n                                                            value=\"\" class=\"form-control  \" \r\r\n                                                            placeholder=\"Your E-mail Id\" \r\r\n                                                             \r\r\n                                                           \/>\r\r\n                                                <\/div>\r\r\n                                            <\/div>\r\r\n\t\t\t\t\t\t\t\t\t\t\r\n                                            <!--bfh-number -->\r\r\n                                            <div class=\"wpdevart-input-field \">\r\r\n                                                 \r\r\n                                                        <label>Address<\/label>\r\r\n                                                \r\n        \r\r\n                                                <div class=\"input-text input-field-inner\">\r\r\n                                                    \r\r\n                                                    <input  type=\"text\"  \r\r\n                                                            id =\"input-field-3\"\r\r\n                                                            name=\"label_3\"   \r\n                                                            value=\"\" class=\"form-control  \" \r\r\n                                                            placeholder=\"Your Address\" \r\r\n                                                             \r\r\n                                                           \/>\r\r\n                                                <\/div>\r\r\n                                            <\/div>\r\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t<div class=\"wpdevart-textarea\">\r\r\n\t\t\t\t\t\t\t\t\t\t \r\r\n\t\t\t\t\t\t\t\t\t\t\t\t<label>Suggestion <\/label> \r\r\n\t\t\t\t\t\t\t\t\t\t \r\r\n\t\t\t\t\t\t\t\t\t\t<textarea name=\"label_4\" placeholder=\"Your Suggestion\"><\/textarea> \r\r\n\t\t\t\t\t\t\t\t\t<\/div>\r\r\n\t\t\t\t\t\t\t\t\t\r\n\t\r\r\n   \r\r\n                   \r\r\n\t\t\t\t\t   \r\n\t\t\t\t\t\t<input type=\"hidden\" name=\"form_id\" value=\"1\" \/>  \r\r\n\t\t\t\t\t\t<!--<input type=\"submit\" value='Suggest' id=\"btn_send_form_email_1\" name=\"btn_send_form_email\" \/>-->\r\r\n\t\t\t\t\t\t<button type=\"submit\" name=\"btn_send_form_email\" id=\"btn_send_form_email_1\" >Suggest<\/button>\r\r\n\t\t\t\t\t\t\r\n\t\r\r\n\t\t\t\t\t  <span id=\"loader-icon-1\" style=\"display:none;\" class=\"form-loader\">\r\r\n\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/pattan.org\/pdo\/v2b1\/wp-content\/plugins\/contact-forms-builder\/\/assets\/images\/loader.gif\" \/>\r\r\n\t\t\t\t\t  <\/span>\r\r\n\t\r\r\n\t\t\t\t   <\/form>\r\r\n\t\r\r\n\t\t\t\t\t\t<div id=\"frontend_form_messages_1\" style=\"margin-top:10px; margin-bottom:10px;\"><\/div>\r\r\n\t\r\r\n\t\t\t\t   <script>\r\r\n\t\r\r\n\t\t\t\t\t\/\/ Document\r\r\n\t\t\t\t\tjQuery( document ).ready(function() {\r\r\n\t\t\t\t\t\t\/\/\tDon't submit form on enter, allow enter button only for texts\r\r\n\t\t\t\t\t\tjQuery(document).on(\"keypress\", \":input:not(textarea)\", function(event) {\r\r\n\t\t\t\t\t\t\treturn event.keyCode != 13;\r\r\n\t\t\t\t\t\t});\r\r\n\t\r\r\n\t\t\t\t\t\t\/\/ Do not use previous password saved in browser for password field\r\r\n\t\t\t\t\t\tjQuery(\"input[type='password']\").attr(\"autocomplete\", \"new-password\");\r\r\n\t\r\r\n\t\t\t\t\t\t\/\/handle form submission\r\r\n\t\t\t\t\t\t\/\/jQuery(\"form[name='wpdevart_frontend_form_1']\").submit(function(e){\r\r\n\t\t\t\t\t\tjQuery(document).on(\"submit\", \"form[name='wpdevart_frontend_form_1']\", function(e) {\r\r\n\t\t\t\t\t\t\t\/\/shortcode attributes e.g\r\r\n\t\t\t\t\t\t\tvar atts = {\"id\":\"1\"};\r\r\n\t\t\t\t\t\t\tvar options = { \r\r\n\t\t\t\t\t\t\t\t\/\/target:'#frontend_form_messages_1',   \/\/ target element(s) to be updated with server response \r\r\n\t\t\t\t\t\t\t\t\/\/ other available options: \r\r\n\t\t\t\t\t\t\t\t url:\"https:\/\/pattan.org\/pdo\/v2b1\/wp-admin\/admin-ajax.php\",        \/\/ override for form's 'action' attribute \r\r\n\t\t\t\t\t\t\t\t\/\/url:\"https:\/\/pattan.org\/pdo\/v2b1\/wp-content\/plugins\/contact-forms-builder\/check-ajax.php\",\r\r\n\t\t\t\t\t\t\t\tdata:{'btn_send_form_email':'1','process_ajax':'1','atts':JSON.stringify(atts),'action':'get_post_information'},\r\r\n\t\t\t\t\t\t\t\t\/\/type:      type        \/\/ 'get' or 'post', override for form's 'method' attribute \r\r\n\t\t\t\t\t\t\t\t\/\/dataType:  null        \/\/ 'xml', 'script', or 'json' (expected server response type) \r\r\n\t\t\t\t\t\t\t\t\/\/clearForm: true ,       \/\/ clear all form fields after successful submit \r\r\n\t\t\t\t\t\t\t\t\/\/resetForm: true  ,      \/\/ reset the form after successful submit \r\r\n\t\r\r\n\t\t\t\t\t\t\t\t\/\/ $.ajax options can be used here too, for example: \r\r\n\t\t\t\t\t\t\t\t\/\/timeout:   3000 \r\r\n\t\r\r\n\t\t\t\t\t\t\t\tbeforeSubmit: function() {\r\r\n\t\t\t\t\t\t\t\t\tjQuery(\"#loader-icon-1\").show();\r\r\n\t\t\t\t\t\t\t\t},\r\r\n\t\t\t\t\t\t\t\tsuccess:showResponse, \/\/ post-submit callback \r\r\n\t\t\t\t\t\t\t }; \r\r\n\t\r\r\n\t\t\t\t\t\t\t\/\/ inside event callbacks 'this' is the DOM element so we first \r\r\n\t\t\t\t\t\t\t\/\/ wrap it in a jQuery object and then invoke ajaxSubmit \r\r\n\t\t\t\t\t\t\tjQuery(this).ajaxSubmit(options); \r\r\n\t\r\r\n\t\t\t\t\t\t\t\/\/ !!! Important !!! \r\r\n\t\t\t\t\t\t\t\/\/ always return false to prevent standard browser submit and page navigation \r\r\n\t\t\t\t\t\t\treturn false; \r\r\n\t\t\t\t\t\t}); \r\r\n\t\r\r\n\t\r\r\n\t\t\t\t\t\tfunction showResponse(responseText, statusText, xhr, $form) {\r\r\n\t\t\t\t\t\t\tstr = responseText;\r\r\n\t\t\t\t\t\t\t\/\/replace first occurence \r\r\n\t\t\t\t\t\t\tstr = str.replace(\"successmsg_\", \" \"); \r\r\n\t\t\t\t\t\t\t\/\/ append response\r\r\n\t\r\r\n\t\t\t\t\t\t\tjQuery(\"#frontend_form_messages_1\").text(\" \");\r\r\n\t\t\t\t\t\t\tjQuery(\"#frontend_form_messages_1\").append(str);\r\r\n\t\t\t\t\t\t\tsetTimeout(function(){ \r\r\n\t\t\t\t\t\t\t\t\/\/jQuery(\"#frontend_form_messages_1 .success_message1\").fadeout(); \r\r\n\t\t\t\t\t\t\t\tjQuery(\"#frontend_form_messages_1 .success_message\").fadeOut();\r\r\n\t\t\t\t\t\t\t}, 5000);\r\r\n\t\r\r\n\t\t\t\t\t\t\t\/\/\tresponseText  , updates the div in target specified in options\r\r\n\t\t\t\t\t\t\tjQuery(\"#loader-icon-1\").hide();\r\r\n\t\r\r\n\t\t\t\t\t\t\tvar matched = responseText.search('successmsg_');\r\r\n\t\t\t\t\t\t\tif(matched != -1) {\r\r\n\t\r\r\n\t\t\t\t\t\t\t\tvar formId = \"1\";\r\r\n\t\t\t\t\t\t\t\t\r\r\n\t\r\r\n\t\t\t\t\t\t\t\tsetTimeout(function(){\r\r\n\t\t\t\t\t\t\t\t\t\t jQuery('#wpdevart-forms-1')[0].reset(); \r\r\n\t\t\t\t\t\t\t\t\t\t jQuery(\"#wpdevart-forms-\"+formId).each(function() {\r\r\n\t\t\t\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\t\t\t\t});\r\r\n\t\t\t\t\t\t\t\t },100);\r\r\n\t\t\t\t\t\t\t }\r\r\n\t\r\r\n\t\t\t\t\t\treturn false;\r\r\n\t\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\tfunction showRequest() {\r\r\n\t\t\t\t\t\t\treturn false;\r\r\n\t\t\t\t\t\t}\r\r\n\t\r\r\n\t\t\t\t\t\tjQuery(document).on(\"click\",\"[type=reset].ws-reset-form\",function(e){\r\r\n\t\t\t\t\t\t\tformId= jQuery(this).attr('data-attr');\r\r\n\t\t\t\t\t\t\t\/\/reset\r\r\n\t\t\t\t\t\t\tjQuery(\"#wpdevart-forms-\"+formId).each(function(){\r\r\n\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\t\t\tjQuery(\"#wpdevart-forms-\"+formId)[0].reset();\r\r\n\t\t\t\t\t\t\t\t});\r\r\n\t\r\r\n\t\t\t\t\t\t\treturn false;\r\r\n\t\r\r\n\t\t\t\t\t\t});\r\r\n\t\t\t\t\t});\r\r\n\t\r\r\n\t\t\t\t\t<\/script>\r\r\n\t\t\t\t\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-89","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pattan.org\/pdo\/v2b1\/wp-json\/wp\/v2\/pages\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pattan.org\/pdo\/v2b1\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/pattan.org\/pdo\/v2b1\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/pattan.org\/pdo\/v2b1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pattan.org\/pdo\/v2b1\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":0,"href":"https:\/\/pattan.org\/pdo\/v2b1\/wp-json\/wp\/v2\/pages\/89\/revisions"}],"wp:attachment":[{"href":"https:\/\/pattan.org\/pdo\/v2b1\/wp-json\/wp\/v2\/media?parent=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}