| 开发者 |
dilipbheda
krishaweb girishpanchal |
|---|---|
| 更新时间 | 2026年3月23日 15:25 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv3 or later |
| 版权网址: | 版权信息 |
[contact-form-7 id="123"] and paste it in the right place. One wrong character and the form breaks. If you have 10 pages with different forms, managing all those shortcodes becomes a headache.
ACF Field for CF7 solves this.
It adds a simple dropdown field with help of Advanced Custom Fields to your page editor that lists all your Contact Form 7 forms. Just pick the form you want and it's done. It shows up on your page. No shortcodes to copy. No code to write. No mistakes.
Before vs After This Plugin
Without this plugin:
contact_form_7, then output it in your template:
// Display the form directly echo get_field( 'your_form_field' );
Need the CF7 form object instead of rendered HTML? Use this filter:
add_filter( 'acf_cf7_object', '__return_true' );
Now get_field() returns the WPCF7_ContactForm object for full control over the output.
Real-World Examples
• Landing Pages — Each landing page has its own lead capture form. Editors pick which form appears — no developer needed.
• Service Pages — A web agency builds one template for all service pages. Each page shows a different inquiry form selected by the client.
• Site-Wide Default Form — Use with ACF option pages to set one global "Contact Us" form across headers, footers, or sidebars.
• Multi-Language Sites — Different forms for different languages, each selected per page through the editor.
ACF Field For CF7 Pro
Need more? The Pro version adds:
• Gutenberg Block Support — Use CF7 forms inside the WordPress block editor.
• Widget & Theme Customizer — Place forms in widget areas and customizer panels.
• Allow Null — Make the form field optional so editors can leave it empty when no form is needed.
• Disable Forms — Mark one or more forms as disabled to prevent them from being selected.
Download the ACF Field For CF7 Pro
Compatibility
This plugin works with:
• ACF 5
• ACF 6
• Contact Form 7 5.9 and above
• WordPress 6.0 and above
• PHP 8.1 and above
acf-field-for-contact-form-7 folder into your wp-content/plugins folder.It adds a dropdown field to your website page editor. That dropdown shows all your Contact Form 7 forms. You pick one, save the page, and the form appears on your website. No technical knowledge needed.
Two plugins must be active:
Yes — but a developer (or someone comfortable with WordPress) needs to do a one-time setup: create the ACF field and add one line of code to your theme template. After that, you manage everything from the page editor with zero code.
Use standard ACF functions:
// Renders the full CF7 form HTML echo get_field( 'your_field_name' );
To get the WPCF7_ContactForm object instead:
add_filter( 'acf_cf7_object', '__return_true' ); $form_object = get_field( 'your_field_name' );
Yes. It registers as a standard ACF field type, so it works anywhere ACF fields work — including flexible content layouts, repeater fields, group fields, and option pages.
The free version works with ACF fields in PHP templates (classic approach). For native Gutenberg block support, the Pro version is recommended.
No. The entire plugin is ~10 KB — smaller than a single image. It loads only what's needed and has no effect on page speed.
Check these three things:
echo get_field( 'your_field_name' ); where the form should appear?
If all three are correct and it still doesn't work, email us at support@krishaweb.com.Email us at support@krishaweb.com — we'd love to hear from you.