Looking to update an ACF field from the frontend? Then this is the guide for you! This post will show you how to update fields for ACF easily!
Approximate read time: 4.5 minutes
Advanced Custom Forms (ACF) is fantastic.
Customizing your form and expanding its capabilities can significantly help your WordPress website.
But, editing code each time you want to update a simple field can take up a lot of time.
What if there was a better way?
Lucky for you, there is. And in today’s post, we’ll show you how to update your ACF field from the frontend easily.
Let’s get into it.
👉 Want to create an ACF Form? : How to Create an ACF Frontend Form [No Code!]
How to use ACF to update fields
To update your ACF fields with the ACF plugin, you must programmatically update each field change.
For example, here’s what some basic code to update an ACF field looks like:
So, you’ll need to edit code every time you want to change something, even if it’s something simple.
But not only can it be a hassle, but it can also be time-consuming. And that may not be time you have.
And we’ve got an easier way to use ACF and update fields from the frontend.
That way, you save time and effort for more important things.
How to update an ACF field from the frontend
You’ll need Formidable Forms, the most advanced form builder WordPress plugin to get started.
But you get plenty of other great features with that plan, like:
- Quiz Builder
- Conversational forms
- Payment integrations
- Forms to PDF
- Google Sheets integration
- And much more
So, head over to our pricing page and grab Formidable. Then we’ll get started, and you can follow along with your form. Also, you can use this tutorial with ACF Pro or Free.
It’s a few simple steps:
Step 1: Create a Formidable ACF form
For our example, we have an excellent cheese business called Cheap n’ Cheesy.
We have a Testimonials page for customers to leave reviews of our business and products. But we don’t want to edit code to make a simple change, so we’ve downloaded Formidable Forms.
Currently in ACF, we have a Field Group with an ACF Repeater field that has the following sub-fields:
So, we need to create our form to map the fields.
First, we’ll go to our WordPress dashboard to Formidable → Forms → Add New.
With Formidable, you can create a Blank form or choose one of Formidable’s 150+ templates. Since we have a custom form, we’ll use a Blank form to customize it fully.
Next, we’ll name our form Testimonials and click Create.
Then, the plugin takes us to Formidable’s drag-and-drop form builder, where we can add any field we want.
Since we already have our ACF fields, we’ll simply create a form to match it. So, we’ll add a Repeater field, then three sub-fields: Dropdown, Star Rating, and a Paragraph field.
So, now our form looks like this:
Now that our form looks good, we need to map the fields between Formidable and ACF.
But first, we’ll click Update to save our changes.
Step 2: Map the fields
To map our fields, we need to go to Settings → Actions & Notifications.
Next, we’ll add an action with the Create Post action.
We can adjust the Action Name, Post Type, and other settings, but we want to find the Custom Fields section.
Here we want to click Map form fields to Advanced Custom Fields toggle.
Here, we can choose our ACF field group from the dropdown and then match our fields.
Now that we have these mapped, we’ll click Update to save the post action changes. And our form is ready to go!
Step 3: Update the fields as needed
It’s been a few months since we created our form, and we thought of some changes to make.
We want to grow our company’s email list, Cheesy Bits, so that we can grow our customer base, too.
We want to add two fields to our form: a checkbox and an email field. Also, we'll update the label of our Comments field to something more engaging.
To start, we’ll head to Custom Fields → Field Groups and find our Testimonials group.
We’ll add two fields: the ACF checkbox and email fields. However, we only need to ask the customer to enter their email, and if they want to subscribe once, we’ll ensure our fields are outside the Repeater field.
Then, we’ll expand the Repeater and Comments fields. To make things easy, we’ll leave the Field Name the same and change the Field Label to Let us hear from you!
Last, we’ll click Save Changes to save the ACF changes.
Next, we must make the same changes to our Formidable ACF form. So, we’ll go to Formidable → Forms and find our Testimonials form.
In our form builder, we’ll drag the matching fields to our form. And we’ll remember to keep them outside the Repeater field, so it only asks once. Then, we’ll update our Comments field label to match the ACF label.
Next, we’ll click Update to save the changes. And now, we just need to map the new fields.
So, we’ll go to Settings → Actions & Notifications → Create Post → Custom Fields. Then, we’ll click the + twice to add two new fields and match the Formidable Fields to the ACF fields.
Last, we’ll click Update to save our changes and watch our email list grow!
Ready to update your ACF fields with ease?
As you can see, Formidable makes updating your custom fields much easier.
You no longer have to update the field programmatically, keeping track of field keys, post IDs, or updating field functions. Simply head to your WP admin and start customizing.
So, don’t wait any longer. Head over and grab Formidable Forms to simplify your ACF workflow!
Read more about Formidable and ACF!
Did you know that Formidable Forms is one of the fastest WordPress form builder plugins available today? If you're not already using it, get started with our free plugin or the full-featured pro version!