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!