Data Source for Contact Form 7

Data Source for Contact Form 7

Wordpress plugin

Install on Wordpress

App Details

Data Source for Contact Form 7 plugin allows populating the “Contact Form 7” fields (text, email, URL, drop-down menu, …) with data stored in external data sources, like a database, CSV file, URL parameters, users information, post data, taxonomies, Advanced Custom Fields (ACF), and JSON objects.

Data Source for Contact Form 7 includes two new controls in the controls bar of Contact Form 7, recordset and recordset field link. The “recordset” control reads the information from the external data source (a database, a CSV file, or any other data source supported), and the “recordset field link” control for linking the recordsets and form fields to populate them with the recordset data.

A form can include several “recordset” fields, and it is possible to link multiple “recordset field link” controls to the same recordset.

How to create the simplest contact form from our practical examples.

The plugin includes other complementary controls in the controls bar in addition to the “recordset” and “recordset field link”. The “Print Form” button for printing the form area, “Data Table” control for inserting an advanced table with the recordset records, “copy to clipboard” functionality for copying the values of the fields into the clipboard, and the “Search box in dropdown menu” functionality to make easy the selection in long dropdown menus.

Features:

  • Set the information of external data sources available for the Contact Form 7 fields.
  • Easy to use, includes two new controls in the controls bar to define the recordsets and the link fields.
  • Includes the “URL Parameters” data source to populate the form’s fields with the values of the URL parameters.
  • Includes the “Users Information” data source to populate the form’s fields with the users’ information.
  • Includes the “Posts Information” data source to populate the form’s fields with the posts’ data, pages, and custom post types (like the WooCommerce products).
  • Includes the “Taxonomy” data source to populate the form’s fields with taxonomy terms, like categories, posts tags, or any other custom taxonomy.
  • Includes the “Database” data source to populate the form’s fields with the information of a database. Allow defining even complex queries.
  • Includes the “Javascript Function” data source to populate the form’s fields with the information returned from a Javascript function.
  • Allows using the fields’ values for filtering the recordset records.
  • Complementary Controls add-on. Includes additional controls and functionalities, such as the “Print Form” button, the addition of the search box to the drop-down menu, copy to clipboard functionality, and Data Table to display the data source records.

Features in Premium version:

  • All features of the free version of the plugin.
  • Includes the “Advanced Custom Fields (ACF)” data source to fill the form filds with data stored in the Advanced Custom Fields in post, users, comments, taxonomies, widgets, and options.
  • Includes the “CSV” data source to populate the form’s fields with the data store into a CSV file.
  • Includes the “JSON” data source to populate the form’s fields with the data store into a JSON file. There are hundreds of services whose outputs are JSON objects.
  • PDF Generator add-on. It generates PDF files with the information collected by the form and attaches them to the notification emails (Supports the “Conditional Fields for Contact Form 7” plugin tags in the PDF file content if the “Conditional Fields for Contact Form 7” plugin is installed on the website).
  • Post Generator add-on. It generates new posts (posts, pages, or any custom post) with the information collected by the form.
  • User Registration add-on to convert contact forms into user registration forms.
  • CSV Generator add-on to populate a CSV file with the information collected by the form.
  • JSON Generator add-on to populate a JSON file with the information collected by the form.
  • Server Side add-on to implement server side functions to call from the Recordset controls and get the list of records.

Data Source Fields

Data Source for Contact Form 7 includes two new controls in the controls bar of Contact Form 7, recordset and recordset field link.

The recordset control reads the information from the external data source and makes it available on the form. A recordset field can read one or many records from the data source.

To insert a recordset field in the form, press the “recordset” button in the controls bar. This action opens a dialog to define the recordset.

The insertion dialog includes common attributes for all data sources and specific attributes for the data source selected.

The “recordset field link” control links a recordset field to other fields in the form to populate them with the recordset data.

To insert a link field in the form, press the “recordset field link” button in the controls bar. This action opens a dialog to define the relationship between a recordset and a form’s field.

The link dialog includes the attributes to define the relationship between the recordset field and the form’s fields.

Cases of Use

Get the information of the registered user and populate the form fields for his name and email:

<label> Your name [text* your-name] </label> <label> Your email [email* your-email] </label> <label> Subject [text* your-subject] </label> <label> Your message (optional) [textarea your-message] </label> [cf7-recordset id="cf7-recordset-434" type="user" attributes="first_name, user_email" logged="1"] [cf7-link-field recordset="cf7-recordset-434" field="your-name" value="first_name"] [cf7-link-field recordset="cf7-recordset-434" field="your-email" value="user_email"] [submit "Submit"] 

Filling a plain text in the form with the first name and last name of the logged user:

<label> Hello <span id="first-name"></span> <span id="last-name"></span></label> <label> Enter your address [textarea address] </label> [cf7-recordset id="cf7-recordset-434" type="user" attributes="first_name, last_name" logged="1"] [cf7-link-field recordset="cf7-recordset-434" field="first-name" value="first_name"] [cf7-link-field recordset="cf7-recordset-434" field="last-name" value="last_name"] [submit "Submit"] 

Populates the list of WooCommerce products and get the price of the selected one:

<label>Products List [select menu-719]</label> <label>Product Price [number number-534]</label> [cf7-recordset id="cf7-recordset-619" type="database" engine="mysql" query="SELECT ID,post_title,meta_value as price FROM {wpdb.posts} posts, {wpdb.postmeta} meta WHERE posts.post_type='product' AND posts.ID=meta.post_id AND meta.meta_key='_regular_price'"] [cf7-link-field recordset="cf7-recordset-619" field="menu-719" value="ID" text="post_title"] [cf7-link-field recordset="cf7-recordset-619" field="number-534" value="price" condition="record['ID']=={field.menu-719}"] [submit "Submit"] 

Using templates to create complex data structures. Displaying the title and excerpt of every published post:

<div id="posts-list"></div> <template id="summary"> <p style="font-style:bold">{attribute.post_title}</p> <p>{attribute.post_excerpt}</p> </template> [cf7-recordset id="cf7-posts" type="post" attributes="post_title,post_excerpt" condition="post_status='publish' AND post_type='post'"] [cf7-link-field recordset="cf7-posts" field="posts-list" value="{template.summary}"] 

The form includes a template tag to design a complex data structure. To access the records attributes from the template, use {attribute.attribute-name} format. Ex. {attribute.post_title}

You can use the templates for the fields’ values or texts. The format for referring to templates is {template.template-id}. You should replace “template-id” with the id of the template tag. Ex. {template.summary}

[cf7-link-field recordset="cf7-posts" field="posts-list" value="{template.summary}"] 

Using Javascript to Access the Recordset Data

The recordset fields trigger the “cf7-recordset” event after receiving the information from the data source, allowing you to access this information with Javascript. In this example, the recordset field reads motivational phrases from a third-party service and displays the first of them into a DIV tag on the form.

Add ons (Extensions)

Complementary Controls add-on

PDF Generator add-on

Post Generator add-on

User Registration add-on

CSV Generator add-on

JSON Generator add-on

Server Side add-on

Pricing

Starting from $0 per month.

Check Out the Video Gallery Widget

By Common Ninja

Video GalleryTry For Free!

App Info

Rating

Reviewers

9 reviews

Tags

cf7
contact form
contact form 7
contact form 7 db
contact form db

Developed By

codepeople

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Video Gallery for Wordpress logo

Video Gallery

Showcase videos with a video gallery that organizes clips from multiple sources in clear visual layouts that keep visitors watching and support higher conversions.

Facebook Reviews for Wordpress logo

Facebook Reviews

Show Facebook reviews to build trust, improve credibility, and help visitors make confident purchase decisions that support higher sales.

Notification Bar for Wordpress logo

Notification Bar

Use a notification bar to alert users, highlight offers, and drive clicks that boost engagement, signups, and conversions.

HIPAA Compliance Forms for Wordpress logo

HIPAA Compliance Forms

Create secure HIPAA compliant forms that protect sensitive data, offer full customization, and integrate easily for safe medical information collection.

Coupon Popup for Wordpress logo

Coupon Popup

Use a coupon popup to highlight special offers, capture email leads, reduce cart abandonment, and turn more visitors into paying customers.

Before & After Slider for Wordpress logo

Before & After Slider

Add an interactive before and after slider to your site to show visual transformations, capture attention, and help visitors understand real results.

Highlighted Headlines for Wordpress logo

Highlighted Headlines

Enhance titles with highlighted headlines that use custom colors, animations, and styles to draw attention and help visitors notice key messages.

Event Flip Cards for Wordpress logo

Event Flip Cards

Use event flip cards to highlight upcoming activities, improve visibility, and help visitors discover events that increase attendance and engagement.

Size Chart for Wordpress logo

Size Chart

Add a flexible size chart with visual guides and category tabs to help users choose accurate measurements while shopping.

Coupon Bar for Wordpress logo

Coupon Bar

Display discounts with a coupon bar that highlights special offers, drives urgency, and helps convert visitors into paying customers.

Team Members Blobs for Wordpress logo

Team Members Blobs

Use team members blobs to present your staff in a clear, creative format that builds trust, supports transparency, and strengthens brand credibility.

Progress Circles for Wordpress logo

Progress Circles

Show progress with animated progress circles that visualize goals, display achievements, and keep visitors engaged.

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms