This plugin hasn’t been tested with the latest 3 major releases of WordPress. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Add Template for Contact Form 7

Sharraxaad

This plugin adds a template function to “Contact Form 7” using a template file.
This is useful for theme developers to smoothly check the display of CF7 tags.
Create an atcf7 directory in the theme folder and place the template file (.php) in that directory.
You can use PHP, WordPress functions / objects, ACF functions (excluding some) in the template file.
However, it is not possible to show / hide form tags and add / remove required mark(*) using PHP.
This plug-in requires Contact Form 7 ver5.5.3 or above.

Example [theme_path/atcf7/***.php]

<?php
if (!defined('ABSPATH')) {
  exit;
}
/*
* Template Name: Distinguishing Name
*/
?>

<h2>
<?php
// Example of using WP function
the_title();
?>
</h2>

<table>
  <tbody>
    <tr>
        <th><label for="your-category" onclick="">Category</label></th>
        <td>
          <?php
            // Example of using get_field of ACF with checkbox
            $cats = "'".get_field("cat1")."'";
            $cats .= " '".get_field("cat2")."'";
            $cats .= " '".get_field("cat3")."'";
          ?>
          [checkbox your-category id:your-category class:atcf7-form-radio-label exclusive use_label_element <?php echo $cats; ?>]
        </td>
    </tr>
    <tr>
      <th><label for="your-name" onclick="">Name</label></th>
      <td>
        [text* your-name id:your-name]
      </td>
    </tr>
    <tr>
      <th><label for="your-email" onclick="">Mail Address</label></th>
      <td>
        <div>
          [email* your-email id:your-email ]
        </div>
      </td>
    </tr>
    <tr>
      <th><label for="your-content" onclick="">Contents</label></th>
      <td>
        [textarea* your-content x5 id:your-content ]
      </td>
    </tr>
  </tbody>
</table>
<div>[submit "Submit"]</div>

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.

Arbitrary section 1

Sawir-shaashado

  • Open the "Template File" tab on the Edit screen of Contact Form 7.
  • Select the template you want to use.(Contains samples.)

Rakibaad

  1. From the WP admin panel, click “Plugins” -> “Add new”.
  2. In the browser input box, type “Add Template for Contact Form 7”.
  3. Select the “Add Template for Contact Form 7” plugin and click “Install”.
  4. Activate the plugin.

OR…

  1. Download the plugin from this page.
  2. Save the .zip file to a location on your computer.
  3. Open the WP admin panel, and click “Plugins” -> “Add new”.
  4. Click “upload”.. then browse to the .zip file downloaded from this page.
  5. Click “Install”.. and then “Activate plugin”.

Dibu-eegisyo

27 Sebteembar, 2023
I’ve been looking for this functionality for quite some time – and finally I’ve discovered ATCF7. It drastically improves any form development and allows to manage your cf7-Templates in a repository. There may be some lacking features but this is really a great base!
Akhri dhammaan 1 dibu-eegis

Ka-qaybgalayaasha & Horumariyayaasha

“Add Template for Contact Form 7” waa softiweer il furan. Dadka soo socda ayaa wax ku biiriyay kaabahan.

Ka-qaybgalayaasha

“Add Template for Contact Form 7” waxaa lagu tarjumay 1 luqad. Way ku mahadsan yihiin turjumaannada ka-qaybqaadashadooda.

Ku tarjun “Add Template for Contact Form 7” luqaddaada.

Ma xiisaynaysaa horumarinta?

Baadh koodka, fiiri bakhaarka SVN, ama iska qor diiwaanka horumarinta adigoo adeegsanaya RSS.

Isbeddellada

1.0.0

First commit.