{"id":121723,"date":"2020-05-18T10:11:17","date_gmt":"2020-05-18T10:11:17","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/lite-contact-form\/"},"modified":"2022-02-16T12:45:12","modified_gmt":"2022-02-16T12:45:12","slug":"lite-contact-form","status":"publish","type":"plugin","link":"https:\/\/jv.wordpress.org\/plugins\/lite-contact-form\/","author":6169743,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.6","stable_tag":"1.1.6","tested":"5.9.13","requires":"4.6","requires_php":"7.0","requires_plugins":"","header_name":"Lite Contact Form","header_author":"Krzysztof Grochocki","header_description":"Lightweight and simple contact form that can be additional protected by Akismet and Google reCAPTCHA.","assets_banners_color":"","last_updated":"2022-02-16 12:45:12","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/beherit.pl\/en\/wordpress\/lite-contact-form\/","header_author_uri":"https:\/\/beherit.pl\/","rating":5,"author_block_rating":0,"active_installs":100,"downloads":5755,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"Beherit","date":"2020-05-18 10:12:11"},"1.1":{"tag":"1.1","author":"Beherit","date":"2020-05-19 11:47:22"},"1.1.2":{"tag":"1.1.2","author":"Beherit","date":"2020-08-05 08:12:08"},"1.1.4":{"tag":"1.1.4","author":"Beherit","date":"2020-08-18 07:46:48"},"1.1.6":{"tag":"1.1.6","author":"Beherit","date":"2022-02-16 12:45:12"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":2309289,"resolution":false,"location":"assets","locale":false}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.1.2","1.1.4","1.1.6"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[360,358,267,108,2739],"plugin_category":[41,42],"plugin_contributors":[91822],"plugin_business_model":[],"class_list":["post-121723","plugin","type-plugin","status-publish","hentry","plugin_tags-contact","plugin_tags-contact-form","plugin_tags-email","plugin_tags-feedback","plugin_tags-feedback-form","plugin_category-communication","plugin_category-contact-forms","plugin_contributors-beherit","plugin_committers-beherit"],"banners":[],"icons":{"svg":"https:\/\/ps.w.org\/lite-contact-form\/assets\/icon.svg?rev=2309289","icon":"https:\/\/ps.w.org\/lite-contact-form\/assets\/icon.svg?rev=2309289","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Lightweight and simple contact form with no additional user-unfriendly options. You can add the contact form to any page with a shortcode <code>[contact_form]<\/code>. Plugin is integrated with plugin <a href=\"https:\/\/wordpress.org\/plugins\/akismet\/\">Akismet<\/a> and <a href=\"https:\/\/wordpress.org\/plugins\/grecaptcha\/\">GreCAPTCHA<\/a> which protect against spam.<\/p>\n\n<!--section=installation-->\n<p>In most cases you can install automatically from plugins page in admin panel.<\/p>\n\n<p>However, if you want to install it manually, follow these steps:<\/p>\n\n<ol>\n<li>Download the plugin and unzip the archive.<\/li>\n<li>Upload the entire <code>lite-contact-form<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the Plugins menu in WordPress.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='how%20to%20change%20sender%20and%20recipient%20email%20address%3F'><h3>How to change sender and recipient email address?<\/h3><\/dt>\n<dd><p>By default, the plugin uses the administrator's email address which is set in the WordPress general settings. It can be changed by adding attributes to the shortcode.<\/p>\n\n<pre><code>[contact_form sender=\"noreply@domain.tld\" recipient=\"Blog Admin &lt;admin@domain.tld&gt;\"]\n<\/code><\/pre><\/dd>\n<dt id='how%20to%20protect%20contact%20form%20against%20spam%3F'><h3>How to protect contact form against spam?<\/h3><\/dt>\n<dd><p>The plugin has no built-in spam protection features, but is integrated with other plugins which do that job in the best way. You can use for it  plugin <a href=\"https:\/\/wordpress.org\/plugins\/akismet\/\">Akismet<\/a> or\/and <a href=\"https:\/\/wordpress.org\/plugins\/grecaptcha\/\">GreCAPTCHA<\/a>.<\/p><\/dd>\n<dt id='will%20this%20plugin%20work%20with%20cache%20plugins%3F'><h3>Will this plugin work with cache plugins?<\/h3><\/dt>\n<dd><p>Yes. The plugin was designed to work with cache plugins. It uses lightweight Vanilla JS script and WordPress REST API to process requests.<\/p><\/dd>\n<dt id='how%20to%20change%20the%20style%20of%20the%20contact%20form%3F'><h3>How to change the style of the contact form?<\/h3><\/dt>\n<dd><p>By default, the fields description is displayed in placeholders, but you can change it to labels.<\/p>\n\n<pre><code>[contact_form style=\"labels\"]\n<\/code><\/pre>\n\n<p>If you want only to change CSS style just add selectors to file style.css in active theme or create new file lite-contact-form.css in active theme.<\/p><\/dd>\n<dt id='how%20to%20add%20custom%20fields%3F'><h3>How to add custom fields?<\/h3><\/dt>\n<dd><p>The plugin is simple and there are no settings to add custom fields, you need to add PHP code e.g. in functions.php in the active theme.<\/p>\n\n<p>Use the add_filter function to add a custom field, there are three filters that you can use.<\/p>\n\n<pre><code>function custom_fields_before() {\n    return '&lt;p class=\"lcf-validate\"&gt;\n        &lt;input type=\"text\" name=\"test\" placeholder=\"Field with JS validation\"&gt;\n        &lt;span class=\"lcf-tip\"&gt;&lt;\/span&gt;\n    &lt;\/p&gt;';\n}\nadd_filter('lcf_before_fields', 'custom_fields_before');\n\nfunction custom_fields_before_message() {\n    return '&lt;p&gt;\n        &lt;input type=\"text\" name=\"test\" placeholder=\"Field without JS validation\"&gt;\n        &lt;span class=\"lcf-tip\"&gt;&lt;\/span&gt;\n    &lt;\/p&gt;';\n}\nadd_filter('lcf_before_message_field', 'custom_fields_before_message');\n\nfunction custom_fields_after() {\n    return 'some html code';\n}\nadd_filter('lcf_after_fields', 'custom_fields_after');\n<\/code><\/pre>\n\n<p>You can validates the entire request or only your field.<\/p>\n\n<pre><code>function custom_field_validate($result, $field, $value) {\n    if(empty($value)) {\n        $result['status'] = 'blocked';\n        $result['fields'][] = array('field' =&gt; $field, 'message' =&gt; 'This field is required.');\n    }\n    return $result;\n}\nadd_filter('lcf_validate_field_name', 'custom_field_validate', 10, 3);\n\nfunction custom_validate_request($result, $fields) {\n    if(...) {\n        $result['status'] = 'error';\n        $result['message'] = 'There was an error trying to send your message.';\n    }\n    return $result;\n}\nadd_filter('lcf_validate', 'custom_validate_request', 10, 2);\n<\/code><\/pre>\n\n<p>There are two more filters that you can use to change the email subject and the message body.<\/p>\n\n<pre><code>function custom_mail_subject($subject, $fields) {\n    return $subject;\n}\nadd_filter('lcf_mail_subject', 'custom_mail_subject', 10, 2);\n\nfunction custom_mail_message($message, $fields) {\n    return $message;\n}\nadd_filter('lcf_mail_message', 'custom_mail_message', 10, 2);\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.6 (2022-02-16)<\/h4>\n\n<ul>\n<li>Minor improvements.<\/li>\n<\/ul>\n\n<h4>1.1.4 (2020-08-18)<\/h4>\n\n<ul>\n<li>Fixed Akismet API call.<\/li>\n<\/ul>\n\n<h4>1.1.2 (2020-08-05)<\/h4>\n\n<ul>\n<li>Minor improvements.<\/li>\n<\/ul>\n\n<h4>1.1 (2020-05-19)<\/h4>\n\n<ul>\n<li>Added a style attribute for shortcode.<\/li>\n<li>Enqueue CSS stylesheet from active theme.<\/li>\n<\/ul>\n\n<h4>1.0 (2020-05-18)<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Lightweight and simple contact form with no additional user-unfriendly options. Can be additionally protected against spam by using Akismet and Google &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/121723","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=121723"}],"author":[{"embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/beherit"}],"wp:attachment":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=121723"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=121723"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=121723"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=121723"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=121723"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=121723"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}