{"id":158640,"date":"2022-06-14T13:57:02","date_gmt":"2022-06-14T13:57:02","guid":{"rendered":"https:\/\/ja.wordpress.org\/plugins\/cf7-add-template\/"},"modified":"2022-07-04T12:49:41","modified_gmt":"2022-07-04T12:49:41","slug":"add-template-for-contact-form-7","status":"closed","type":"plugin","link":"https:\/\/tr.wordpress.org\/plugins\/add-template-for-contact-form-7\/","author":20466032,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.3","stable_tag":"1.0.4","tested":"6.0.12","requires":"4.9","requires_php":"7.0","requires_plugins":"","header_name":"Add Template for Contact Form 7","header_author":"matorel","header_description":"Add template function to contact form 7.","assets_banners_color":"d4c2bd","last_updated":"2022-07-04 12:49:41","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/matorel.com\/?p=1255","header_author_uri":"","rating":5,"author_block_rating":0,"active_installs":100,"downloads":4019,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"matorel","date":"2022-06-14 13:56:29"},"1.0.1":{"tag":"1.0.1","author":"matorel","date":"2022-06-14 14:07:32"},"1.0.2":{"tag":"1.0.2","author":"matorel","date":"2022-06-14 14:16:41"},"1.0.3":{"tag":"1.0.3","author":"matorel","date":"2022-06-14 23:29:57"},"1.0.4":{"tag":"1.0.4","author":"matorel","date":"2022-07-04 12:49:41"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":{"icon-128\u00d7128.png":{"filename":"icon-128\u00d7128.png","revision":2742306,"resolution":"128x128","location":"assets","locale":""},"icon-256\u00d7256.png":{"filename":"icon-256\u00d7256.png","revision":2742306,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544\u00d7500-rtl.jpg":{"filename":"banner-1544\u00d7500-rtl.jpg","revision":2742306,"resolution":"1544x500","location":"assets","locale":""},"banner-1544\u00d7500.jpg":{"filename":"banner-1544\u00d7500.jpg","revision":2742306,"resolution":"1544x500","location":"assets","locale":""},"banner-772\u00d7250-rtl.jpg":{"filename":"banner-772\u00d7250-rtl.jpg","revision":2742306,"resolution":"772x250","location":"assets","locale":""},"banner-772\u00d7250.jpg":{"filename":"banner-772\u00d7250.jpg","revision":2742306,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","1.0.2","1.0.3","1.0.4"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2742306,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":2742306,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Open the \"Template File\" tab on the Edit screen of Contact Form 7.","2":"Select the template you want to use.(Contains samples.)"}},"plugin_section":[],"plugin_tags":[360,358,361,662,975],"plugin_category":[42,43],"plugin_contributors":[211231],"plugin_business_model":[],"class_list":["post-158640","plugin","type-plugin","status-closed","hentry","plugin_tags-contact","plugin_tags-contact-form","plugin_tags-form","plugin_tags-php","plugin_tags-template","plugin_category-contact-forms","plugin_category-customization","plugin_contributors-matorel","plugin_committers-matorel"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/add-template-for-contact-form-7_d4c2bd.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/add-template-for-contact-form-7\/assets\/screenshot-1.png?rev=2742306","caption":"Open the \"Template File\" tab on the Edit screen of Contact Form 7."},{"src":"https:\/\/ps.w.org\/add-template-for-contact-form-7\/assets\/screenshot-2.png?rev=2742306","caption":"Select the template you want to use.(Contains samples.)"}],"raw_content":"<!--section=description-->\n<p>This plugin adds a template function to \"Contact Form 7\" using a template file.\nThis is useful for theme developers to smoothly check the display of CF7 tags.\nCreate an atcf7 directory in the theme folder and place the template file (.php) in that directory.\nYou can use PHP, Wordpress functions \/ objects, ACF functions (excluding some) in the template file.\nHowever, it is not possible to show \/ hide form tags and add \/ remove required mark(*) using PHP.\nThis plug-in requires Contact Form 7 ver5.5.3 or above.<\/p>\n\n<p><strong>Example [theme_path\/atcf7\/***.php]<\/strong><\/p>\n\n<pre><code>&lt;?php\nif (!defined('ABSPATH')) {\n  exit;\n}\n\/*\n* Template Name: Distinguishing Name\n*\/\n?&gt;\n\n&lt;h2&gt;\n&lt;?php\n\/\/ Example of using WP function\nthe_title();\n?&gt;\n&lt;\/h2&gt;\n\n&lt;table&gt;\n  &lt;tbody&gt;\n    &lt;tr&gt;\n        &lt;th&gt;&lt;label for=\"your-category\" onclick=\"\"&gt;Category&lt;\/label&gt;&lt;\/th&gt;\n        &lt;td&gt;\n          &lt;?php\n            \/\/ Example of using get_field of ACF with checkbox\n            $cats = \"'\".get_field(\"cat1\").\"'\";\n            $cats .= \" '\".get_field(\"cat2\").\"'\";\n            $cats .= \" '\".get_field(\"cat3\").\"'\";\n          ?&gt;\n          [checkbox your-category id:your-category class:atcf7-form-radio-label exclusive use_label_element &lt;?php echo $cats; ?&gt;]\n        &lt;\/td&gt;\n    &lt;\/tr&gt;\n    &lt;tr&gt;\n      &lt;th&gt;&lt;label for=\"your-name\" onclick=\"\"&gt;Name&lt;\/label&gt;&lt;\/th&gt;\n      &lt;td&gt;\n        [text* your-name id:your-name]\n      &lt;\/td&gt;\n    &lt;\/tr&gt;\n    &lt;tr&gt;\n      &lt;th&gt;&lt;label for=\"your-email\" onclick=\"\"&gt;Mail Address&lt;\/label&gt;&lt;\/th&gt;\n      &lt;td&gt;\n        &lt;div&gt;\n          [email* your-email id:your-email ]\n        &lt;\/div&gt;\n      &lt;\/td&gt;\n    &lt;\/tr&gt;\n    &lt;tr&gt;\n      &lt;th&gt;&lt;label for=\"your-content\" onclick=\"\"&gt;Contents&lt;\/label&gt;&lt;\/th&gt;\n      &lt;td&gt;\n        [textarea* your-content x5 id:your-content ]\n      &lt;\/td&gt;\n    &lt;\/tr&gt;\n  &lt;\/tbody&gt;\n&lt;\/table&gt;\n&lt;div&gt;[submit \"Submit\"]&lt;\/div&gt;\n<\/code><\/pre>\n\n<p>For the theme developer to make the confirmation smooth, create the atcf7 directory in the theme folder and place the template file (.php) in that directory.<\/p>\n\n<h3>Arbitrary section 1<\/h3>\n\n<!--section=installation-->\n<ol>\n<li>From the WP admin panel, click \u201cPlugins\u201d -&gt; \u201cAdd new\u201d.<\/li>\n<li>In the browser input box, type \u201cAdd Template for Contact Form 7\u201d.<\/li>\n<li>Select the \u201cAdd Template for Contact Form 7\u201d plugin and click \u201cInstall\u201d.<\/li>\n<li>Activate the plugin.<\/li>\n<\/ol>\n\n<p>OR\u2026<\/p>\n\n<ol>\n<li>Download the plugin from this page.<\/li>\n<li>Save the .zip file to a location on your computer.<\/li>\n<li>Open the WP admin panel, and click \u201cPlugins\u201d -&gt; \u201cAdd new\u201d.<\/li>\n<li>Click \u201cupload\u201d.. then browse to the .zip file downloaded from this page.<\/li>\n<li>Click \u201cInstall\u201d.. and then \u201cActivate plugin\u201d.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<p>First commit.<\/p>","raw_excerpt":"Add template function by PHP file to &quot;Contact Form 7&quot; for theme developers. This plug-in requires Contact Form 7 ver5.5.3 or above.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/158640","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=158640"}],"author":[{"embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/matorel"}],"wp:attachment":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=158640"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=158640"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=158640"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=158640"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=158640"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=158640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}