I created a field group with the ID ‘203’ and inside it contains a text field with the name ‘my_collar’. I managed to get it displayed in the backend, under the user profile page. Right now, I would like to display this as an input field on the front end which allow users to enter a value and save it. Upon saving, the backend should be updated with the input value.
How should I go about doing this?
Hi @edmundcwm
In this case, you need to use acf_form() to show the front end form. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/create-a-front-end-form/.
But because you want to show the field from a user, then you need to pass the
“post_id” with a different format. This page should give you more idea about it: https://www.advancedcustomfields.com/resources/how-to-get-values-from-a-user/.
So it should be like this:
acf_form(array(
'post_id' => 'user_'.99,
));
Where 99 is the user ID.
I hope this helps 🙂