Support

Account

Home Forums General Issues Saving fields to user registration form Reply To: Saving fields to user registration form

  • Hi @dhod and @bowersinit

    when using acf_form within another field like this there’s no automagic saving happening so you’ll have to do that yourself (as you figured out).

    I think what you need is to hook into the user_register action:
    https://codex.wordpress.org/Plugin_API/Action_Reference/user_register

    and save the ACF input values to their respective fields. Something like:

    
    
    function save_additional_user_meta( $user_id ) {
    
        if ( isset( $_POST['NAME PARAMETER OF THE ACF INPUT FIELD'] ) )
            update_user_meta($user_id, 'first_name', $_POST['NAME PARAMETER OF THE ACF INPUT FIELD']);
    
    }
    add_action( 'user_register', 'save_additional_user_meta', 10, 1 );