WordPress plugin

ACF Field For CF7 Pro

ACF Field For CF7 Pro connects Advanced Custom Fields with Contact Form 7. Its field lists available forms in a dropdown, where an editor can select the one to use. A theme template can read the saved field value and show the selected form on the front end, so editors do not need to paste shortcode strings into page content.

ACF Field For CF7 Pro

Select forms through an ACF field

ACF Field For CF7 Pro connects Advanced Custom Fields with Contact Form 7. Its field lists available forms in a dropdown, where an editor can select the one to use. A theme template can read the saved field value and show the selected form on the front end, so editors do not need to paste shortcode strings into page content.

Editor locations and form controls

Pro supports using Contact Form 7 forms in the Gutenberg block editor, widget areas, and Theme Customizer panels. The field can be optional when a location does not need a form. Forms marked as disabled are unavailable for selection.

Page-specific and shared forms

Page-specific selections

Assign a field to a landing page or service page and choose the form that page needs. A reusable template can display various forms according to each page's saved selection.

Site-wide and multilingual selections

An ACF option page can hold a shared form selection for a header, footer, or sidebar. On a multilingual website, editors can select a various form for each language version.

Setup and template output

Advanced Custom Fields and Contact Form 7 must both be active. ACF delivers the field; Contact Form 7 delivers the forms. Create a field with the contact_form_7 type, assign it to the location where it will be used, and add the field output to the relevant theme template.

  1. Create a form in Contact Form 7.
  2. Create an Advanced Custom Field with the contact_form_7 field type.
  3. Assign the field to the page, post, option page, widget, or supported Customizer location.
  4. Select a Contact Form 7 form from the dropdown and save the content.
  5. Output the ACF value in the template where the form should appear.

In a template, use the standard ACF function:

echo get_field( 'your_form_field' );

To work with the WPCF7_ContactForm object instead, enable the acf_cf7_object filter. The field then returns the form object for custom output:

add_filter( 'acf_cf7_object', '__return_true' );

Listed compatibility: ACF 5 and 6, Contact Form 7 5.9 and above, WordPress 6.0 and above, and PHP 8.1 and above.

Welcome to The Crafted Nest

Get 10% off your first order

Hand-carved marble home décor, delivered free across India. Share your WhatsApp number and we’ll show your code right away.

One use per customer. We’ll occasionally send new pieces and offers; reply STOP anytime.

WordPress Market Pledged Plugins PCI Gateway for NMI and WooCommerce Pro Plover Kit Premium Plugin Ongkos Kirim JNE Tiki Sicepat Wahana J&T POS for Woocommerce PRO Podcast Importer Pro Podcast Player Pro Points and Rewards for WooCommerce Pro Poll Maker Pro Polylang Pro Popup Box Pro Popup Box Pro