Free delivery across India · Handcrafted marble home décor · GST invoice with every order
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.
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.
- Create a form in Contact Form 7.
- Create an Advanced Custom Field with the
contact_form_7field type. - Assign the field to the page, post, option page, widget, or supported Customizer location.
- Select a Contact Form 7 form from the dropdown and save the content.
- 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.
