Code and Core Repeater Fields for Contact Form 7

Description

Code and Core Repeater Fields for Contact Form 7 takes your classic Contact Form 7 forms to the next level by allowing users to add an unlimited, or strictly limited, number of dynamic field blocks.

Whether you are collecting an unknown number of attendees for an event, gathering past employment history records, dynamically submitting multiple file uploads, or tracking an indefinite list of inventory items the Repeater Extension seamlessly integrates directly into your Contact Form 7 editor, providing the ultimate solution for complex form data collection.

If you are looking to create highly converting, dynamic WordPress forms, the Code and Core Repeater Fields for CF7 plugin is an essential add-on. Gone are the days of creating tedious, hard-coded long forms with dozens of unnecessary inputs. By allowing your website visitors to recursively duplicate form field groups or “add more rows” on the fly, you instantly streamline the user experience, improve your form submission rates, and collect cleanly structured data arrays.

This lightweight, developer-friendly CF7 repeater extension is fully optimized for performance and modern WordPress site architecture. Whether you urgently need a ‘CF7 add more fields’ button, dynamic repeatable multipart form rows, or a frontend input cloner, our extension handles it flawlessly. It acts as the perfect dynamic form builder solution to collect complex nested data like family member details, employment histories, or multiple product order requests directly inside your existing Contact Form 7 setup.

Core Features & Highlights

  • Native CF7 Integration: We built the repeater seamlessly into the Contact Form 7 tag generator UI. You simply click the “Repeater” button just as you would for any standard text or email tag.
  • Mail Tag Auto-Generation: Your repeater groups appear right inside the CF7 “Mail” tab. Drop in your repeater tag (e.g., [attendees]), and the plugin automatically prints out the gathered fields!
  • Global Configuration Dashboard: Tired of manually typing “Add Row” into every form? Use the brand-new, beautifully designed Repeater Settings panel to configure global defaults for button labels.
  • Advanced Output Formatting: Output the collected repeating fields into your email templates as either clean HTML Tables or beautifully formatted indented Lists.
  • Limit User Inputs (Min/Max Validation): Restrict how many repeating blocks a user can generate. Enforce a minimum of 1 and a maximum of 5 to protect your inbox from being flooded, with smart validation natively warning the user.
  • Dynamic Field Triggers: Link your repeater directly to other form fields (like a number input or dropdown menu). When a user types “5” into a trigger field, the repeater automatically generates exactly 5 rows instantly!
  • Asset Optimization Engine: Don’t let your website slow down! The plugin safely enqueues JavaScript conditionally only on the pages actually rendering a CF7 Repeater shortcode.
  • 100% WPML & Translation Compatible: All of the plugin’s interface texts, dynamic configurations, and alerts strictly run through WordPress localization hooks and WPML filter strings, guaranteeing zero compatibility issues on multi-lingual translated websites.
  • Developer Friendly Email Templating: Need more than just Tables or Lists? Easily override the core HTML email layouts by dropping a simple PHP template file directly into your own active WordPress theme. Complete structural control without ever modifying plugin core files!

External services

This plugin connects to a third-party service at https://wordpress-plugins.pro/ for the following purposes:

  1. Deactivation Feedback: When you deactivate the plugin, an optional feedback form allows you to share why you are deactivating. If you fill this out, it sends the reason, site URL, plugin/WordPress/PHP versions, and active theme information. This helps us improve the plugin.
  2. Usage Tracking (Telemetry): If you explicitly opt-in via our settings or the activation modal, the plugin will occasionally send anonymous site diagnostics (site URL, plugin/WP/PHP versions, and active theme info) to help us prioritize compatibility updates and features.

This service is provided by “WordPress Plugins Pro”: General Conditions, Privacy Policy.

Usage Guide

Here are the two primary ways to implement the Repeater Field based on your dynamic form requirements:

1. Manual Mode (User-Controlled Rows)

In this mode, users click “Add” to add new rows and “Remove” to delete them. This is ideal for general lists like attendees or work experience.

[repeater contact-list initial:1 max:10 add_text:"Add row" remove_text:"Remove row"]
  <label> Full Name: [text* contact-name] </label>
  <label> Phone: [tel* contact-phone] </label>
[/repeater]

2. Auto-Generation Mode (With Trigger Field)

This mode automatically generates a specific number of rows based on a numeric value from another field (e.g., a dropdown or number input). It removes the manual “Add Row” button for a more streamlined experience.

<label> How many guests are coming?
  [select guest-count "1" "2" "3" "4" "5"] </label>

<!-- Linking to guest-count via the trigger attribute -->
[repeater guests trigger:guest-count]
  <label> Guest Name: [text guest-name] </label>
[/repeater]

3. Displaying in Emails

To show the collected repeater data in your email notifications, go to the Mail tab in Contact Form 7 and use the repeater’s ID (e.g., [guests]) inside the Message Body:

Hello Admin, here is the submitted data:

[guests]

The plugin will automatically render the data as a professional HTML Table or a formatted List depending on your configuration.

4. Advanced Shortcode Example: Inline Email Lists

Want your data as a bulleted list instead of a table? Simply pass the mail_format attribute directly into your form shortcode!

[repeater attendees mail_format:"list"]
...
[/repeater]

5. Custom Email template

If you want complete control over how the repeating fields look in your email notifications, you can override the default template safely from your theme!

  1. Go to your active theme (or child theme) directory.
  2. Inside your theme, create a new folder path: code-and-core-repeater-fields-for-contact-form-7/templates/
  3. Copy the file code-and-core-repeater-fields-mail.php from our plugin’s /templates/ directory into this newly created folder.
  4. Open the copied file and edit the HTML variables however you like!

Custom Template Code Example (code-and-core-repeater-fields-mail.php):
Our PHP template natively exposes $sub_fields (an array of your CF7 field names) and $rows (a 2D array containing every user submission). You can elegantly loop through them like this:

<?php
// Our custom overridden code-and-core-repeater-fields-mail.php template natively loading from our Theme!
foreach ($rows as $index => $row) {
    echo '<div style="background: #f1f1f1; padding: 10px; margin-bottom: 5px;">';
    echo '<h4>Attendee #' . ($index + 1) . '</h4>';

    foreach ($sub_fields as $field_name) {
        $value = isset($row[$field_name]) ? $row[$field_name] : 'N/A';
        echo '<p><strong>' . esc_html($field_name) . ':</strong> ' . esc_html($value) . '</p>';
    }

    echo '</div>';
}
?>

The plugin will automatically detect and load your beautiful custom theme layout instead of the default HTML table!

Screenshots

  • CF7 Editor Button: A vibrant ‘Repeater’ button is now natively integrated into your Contact Form 7 tag generator area.
  • Tag Generator Popup: The intuitive modal window where you can customize labels, row limits, and auto-triggers in seconds.
  • Manual Mode Editor: The backend view showing the standard [repeater] shortcode structure with manual row controls.
  • Frontend: Manual Mode: A sleek live form featuring the “Add Row” and “Remove” responsive buttons for an attendee list.
  • Auto-Trigger Editor: How the trigger attribute looks inside the CF7 editor, linked to a numeric input field.
  • Frontend: Auto-Trigger Mode: A dynamic form where rows automatically appear or disappear based on a quantity dropdown selection.
  • Email Output: Table Format: A professional mockup showing repeater data delivered in a perfectly structured HTML table.
  • Email Output: List Format: The alternative delivery format showing your data as a clean, formatted bulleted list.
  • Plugin Settings Dashboard: The premium, modern settings page where you can configure global defaults and styling presets.

Installation

Installing the plugin is standard and simple:

  1. Navigate to your WordPress Admin Dashboard.
  2. Go to Plugins > Add New and click Upload Plugin.
  3. Upload the downloaded code-and-core-repeater-fields-for-contact-form-7.zip file and click Install Now.
  4. Click Activate Plugin. (You will be seamlessly redirected to our Settings Dashboard).
  5. Open any Contact Form 7 form editor to start building dynamic lists!

FAQ

Does this support conditional logic?

Currently, the Repeater Extension natively focuses solely on duplicating elements. It works perfectly alongside standard CF7 extensions, though deep JS-based conditional logic within nested repeaters may require testing based on the third-party logic plugin.

Can I put REQUIRED fields (like `[text*]`) inside a repeater block?

Absolutely. Our plugin ties directly into CF7’s JS controller. If a user duplicates a block that contains a required field, the entire form’s validation will safely block submission until all duplicated required fields are completely filled out.

How do I change the default CSS (colors, margins)?

The Repeater Extension outputs clean frontend HTML with specific classes (.wpcf7-repeater-wrap, .wpcf7-repeater-btn-add, etc.). We have included a “Disable Default CSS” toggle located in Contact > Repeater Settings, allowing you to completely strip our styling and use your own Theme’s custom CSS parameters perfectly.

How do I completely customize the Email Template HTML?

If the default ‘Table’ or ‘List’ formats do not suit your needs, you can easily override the underlying PHP email template safely from your theme! Please read the Custom Email Template section above for full instructions.

What does the “Trigger Field” option do?

The Trigger Field evaluates another field in your form (like a Dropdown or Number Input) and automatically generates that exact number of rows! For example, if you have a dropdown asking “How many tickets do you need?” with the name ticket-count, you can type ticket-count into the Trigger Field box. When a user selects “3”, the plugin will instantly and automatically generate 3 attendee row blocks for them!

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Code and Core Repeater Fields for Contact Form 7” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0 – 2026-04-03

  • Initial Release: Comprehensive plugin release featuring Global Settings Dashboards, Assets Optimization, Native Validation limiters (min/max), and robust WPML translation injection natively.