{"id":1078,"date":"2016-04-26T10:12:23","date_gmt":"2016-04-26T09:12:23","guid":{"rendered":"http:\/\/www.fongw.org.uk\/?page_id=1078"},"modified":"2016-04-26T10:12:23","modified_gmt":"2016-04-26T09:12:23","slug":"secretary","status":"publish","type":"page","link":"http:\/\/www.fongw.org.uk\/?page_id=1078","title":{"rendered":"Secretary"},"content":{"rendered":"<p>To contact the Secretary, please complete this form:-<\/p>\n\r\n<!-- START JS for Form ID: 1074 -->\r\n<script type=\"text\/javascript\">\r\njQuery(document).ready(function($) {\r\n\r\n    jQuery(\"#preloader-azucxa\").fadeOut(500, function() {\r\n        jQuery(\"#ecf-form-azucxa\").fadeIn(100);\r\n    });\r\n\r\n    Ladda.bind('.ladda-button');\r\n\r\n    $(function() {\r\n\r\n        \r\n        \/* Validation *\/\r\n        $(\"#form-azucxa\").validate({\r\n            \/* Rules for form validation *\/\r\n            rules: {\r\n                name0:{required: true},email1:{required: true,email: true},text2:{required: true},message3:{required: true,minlength: 10},\r\n\r\n                            },\r\n            \/* Messages for form validation *\/\r\n            messages: {\r\n                name0:{required: \"This field is required\"},email1:{required: \"This field is required\"},text2:{required: \"This field is required\"},message3:{required: \"This field is required\"}            },\r\n            \/* Do not change code below *\/\r\n            errorPlacement: function(error, element) {\r\n                error.insertAfter(element.parent());\r\n            },\r\n\r\n            submitHandler: function(form) {\r\n                                ecf_onsubmit(jQuery('.form-azucxa'));\r\n\r\n                \r\n            },\r\n\r\n            invalidHandler: function(form) {\r\n                Ladda.stopAll();\r\n            },\r\n\r\n            onkeyup: false,\r\n            onfocusout: false,\r\n            onclick: false\r\n\r\n        });\r\n    });\r\n\r\n\r\n    \/* Form Submit ( Ajax ) *\/\r\n    function ecf_onsubmit(form) {\r\n\r\n        if (form.attr('action') == '#') {\r\n\r\n            data = {};\r\n            eldat = [];\r\n            data['action'] = 'ecf_deliver_mail';\r\n            data['formid'] = '1074';\r\n            data['security'] = '5a03fa64bd';\r\n\r\n\r\n            \r\n            jQuery('input, textarea', form).each(function(key) {\r\n\r\n                items = {};\r\n\r\n                if (typeof $(this).data('type') === 'undefined') {\r\n                    return true;\r\n                }\r\n\r\n\r\n                \r\n                items['type'] = $(this).data('type');\r\n                items['label'] = $(this).data('label');\r\n                items['value'] = this.value;\r\n                items['name'] = this.name;\r\n\r\n                eldat.push(items);\r\n\r\n            });\r\n\r\n\r\n                        data['allelmnt'] = eldat;\r\n\r\n            submitForm();\r\n\r\n            return false;\r\n\r\n        }\r\n\r\n    }\r\n\r\n    \/* Start submitForm\t *\/\r\n    function submitForm() {\r\n\r\n        jQuery.ajax({\r\n            url: 'http:\/\/www.fongw.org.uk\/wp-admin\/admin-ajax.php',\r\n            type: 'POST',\r\n            dataType: 'json',\r\n            data: data,\r\n            success: function(data) {\r\n\r\n                if (data.Ok == true) {\r\n\r\n                    $(\"#form-azucxa\").get(0).reset();\r\n\r\n                    if (data.msg == 'redirect') {\r\n                        window.location = \"http:\/\/\";\r\n                    } else {\r\n                        notifyme('Your Message Submitted Successfully', 'n', 'success',\r\n                            'left middle');\r\n                    }\r\n\r\n                } else {\r\n                    notifyme(data.msg, 'n', 'error', 'left middle');\r\n                }\r\n\r\n                Ladda.stopAll();\r\n\r\n            }\r\n        });\r\n\r\n        \r\n    }\r\n\r\n\r\n    \/* Notify *\/\r\n    function notifyme(msg, b, typ, pos) {\r\n        if (b == 'n') {\r\n            b = 'cf-submittedazucxa';\r\n        } else {\r\n            b = 'atcazucxa';\r\n        }\r\n\r\n        $(\"#\" + b).gnotify(msg, {\r\n            style: \"nbootstrap\",\r\n            elementPosition: pos,\r\n            className: typ\r\n        });\r\n\r\n        msg = null;\r\n        typ = null;\r\n\r\n    }\r\n\r\n});\r\n<\/script>\r\n<!-- END JS for Form ID: 1074 -->\r\n\r\n<!-- START Form Markup for Form ID: 1074 -->\r\n<div id=\"preloader-azucxa\" class=\"ecfpreloader\"><\/div>\r\n<div id=\"ecf-form-azucxa\" class=\"ecf-body\">\r\n    <form method=\"post\" enctype=\"multipart\/form-data\" action=\"#\" id=\"form-azucxa\" class=\"ecf-form form-azucxa\">\r\n        <header>Secretary<\/header>        <fieldset>\r\n            <section><label class=\"label\">Name<\/label><label class=\"input\"><input data-type=\"name\" data-label=\"Name\" id=\"name0\" type=\"text\" name=\"name0\" \/><\/label><\/section><section><label class=\"label\">Email<\/label><label class=\"input\"><input data-type=\"email\" data-label=\"Email\" id=\"email1\" type=\"text\" name=\"email1\" \/><\/label><\/section><section><label class=\"label\">Subject<\/label><label class=\"input\"><input data-type=\"text\" data-label=\"Subject\" id=\"text2\" type=\"text\" name=\"text2\" \/><\/label><\/section><section><label class=\"label\">Message<\/label><label class=\"textarea\"><textarea data-type=\"message\" data-label=\"Message\" id=\"message3\" name=\"message3\" rows=\"7\"><\/textarea><\/label><\/section>        <\/fieldset>\r\n        <footer>\r\n            <button data-style=\"slide-down\" id=\"cf-submittedazucxa\" class=\"ecfbutton ladda-button\" type=\"submit\" name=\"cf-submittedazucxa\"><span class=\"ladda-label\">SEND<\/span><\/button>\r\n        <\/footer>\r\n    <\/form>\r\n\r\n    \r\n<\/div>\r\n<!-- END Form Markup for Form ID: 1074 -->\r\n\r\n\r\n\t\t\t\t\n","protected":false},"excerpt":{"rendered":"<p>To contact the Secretary, please complete this form:-<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":193,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"onecolumn-page.php","meta":{"footnotes":""},"class_list":["post-1078","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.fongw.org.uk\/index.php?rest_route=\/wp\/v2\/pages\/1078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.fongw.org.uk\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.fongw.org.uk\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.fongw.org.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.fongw.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1078"}],"version-history":[{"count":1,"href":"http:\/\/www.fongw.org.uk\/index.php?rest_route=\/wp\/v2\/pages\/1078\/revisions"}],"predecessor-version":[{"id":1079,"href":"http:\/\/www.fongw.org.uk\/index.php?rest_route=\/wp\/v2\/pages\/1078\/revisions\/1079"}],"up":[{"embeddable":true,"href":"http:\/\/www.fongw.org.uk\/index.php?rest_route=\/wp\/v2\/pages\/193"}],"wp:attachment":[{"href":"http:\/\/www.fongw.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}