Support

Account

Home Forums ACF PRO I want to show and Update User's ACF Meta Infos

Helping

I want to show and Update User's ACF Meta Infos

  • So, I have created a filed group for the user where a user will have some information like “Occupation”, “Phone Number”, “Favourite Pet”. I am collecting these data while a user is registering.

    Now I want to create a frontend form where the form will load with these data (user added while registering) and a user can see what they added before and they will be able to update those data.

    I got this code which just loads the form fields..but the problem is it’s not loading the data which the user already entered while registering.

    `<?php $options = array(
    ‘post_id’ => ‘user_’.$current_user->ID,
    ‘field_groups’ => array(10998),
    ‘form’ => true,
    ‘return’ => add_query_arg( ‘updated’, ‘true’, get_permalink() ),
    ‘html_before_fields’ => ”,
    ‘html_after_fields’ => ”,
    ‘submit_value’ => ‘Update’
    );
    acf_form( $options );
    ?>`

  • how are you getting $current_user. Other than maybe not supplying the correct value for post_id I don’t see anything that should cause this.

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘I want to show and Update User's ACF Meta Infos’ is closed to new replies.