Home › Forums › Front-end Issues › ACF_form User Profile editing › Reply To: ACF_form User Profile editing
Hi @leanda
That’s because you were trying to get the posted URL using the field name instead of the field key:
$urlField = $_POST['acf']['profile_website'];
If you need to get the posted value, you can do it like this for the unvalidated value:
$urlField = $_POST['acf']['field_1234567890abc'];
Or like this for the validated value:
$urlField = get_field('profile_website', $post_id);
Where ‘field_1234567890abc’ is the field key. Please keep in mind that the get_field()
function will only work if you use it in the acf/save_post
hook with priority more than 10.
I hope this helps 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.