Support

Account

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 🙂