ACF, Filter and Hooks, Programming, WordPress

Saving the CF7 submission in the Dashboard using ACF

1. First, create an acf options page. I am creating Cf7 Submissions as my option page where I will list all my form submissions values

2. Create a form using CF7. I am using the default form cf7 provides

3. Create a repeater field in acf to save the form submitted values in the database and assign it to Cf7 Submissions options page

4. CF7 provides hook wpcf7_before_send_mail which enable us to process the  submiited data the way we like before submitting the form. I am using this hook to save the form submission in the dashboard

5. update_field updates the values in the database
We are capturing the previously submitted data, so that we could merge it with the new submitted form values .

Note : The previously saved data’s in the repeater fields are lost if we don’t merge and update it with the new data’s submitted by the form

6.  Check the cf7 submission options page to see the lists of saved submitted form fields in the dashboard


Hits: 8

ACF, Filter and Hooks, WordPress

Issue : Custom Field Option missing from the WordPress screen options

If you have installed ACF WordPress plugin for creating custom meta boxes, then it removes the the default custom field metaboxes . The main objective of removing the default WordPress custom field is to increase the speed of load time while editing the posts. Also, you shouldn’t need the custom fields if you have ACF plugin installed in your WordPress site. However, if you need to use default WordPress custom field metabox then you can add the following code to your WordPress theme’s functions.php file.

This will solve your  custom field Option missing issue.

Hits: 19

ACF, Programming, WordPress

WordPress Mutisite PHP Fatal error: Call to undefined function get_field() when creating user

Suppose, you have set up Multisite and use get_field() function (Activated ACF Plugin) in your header.php file to get custom filed content. This has no issue for normal site without network but, for Multisite, when a new user is registered, the user gets an activation email with a link to YOUR-SITE-URL/wp-activate.php?key=RANDOMKEY. This link however turns out blank, without being able to access the get_field function. To display activation link content, you can wrap the call to get_field in an “if function_exist(‘get_field’)” function, which solves your issue but this obviously, can’t load the contents of custom fields.

To fix the undefined function issue, load acf.php in your function.php .


Hits: 600