• Looking to auto populate a registered user personal information into the form when they are signed in and go to the page.

    Any hints on making this happen?

    Thanks Steve Fulton, UE

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Roland Murg

    (@murgroland)

    Hey @ogs2017,

    For this, you can use the Dynamic population functionality: https://www.wpbookingsystem.com/documentation/dynamic-form-field-population/

    You will need to add a filter for each field you want to dynamically populate.

    Something like this:

    // first name
    add_filter('wpbs_form_field_value_1_2', function(){
         return get_user_meta( get_current_user_id(), 'first_name', true );
    });
    
    //email
    add_filter('wpbs_form_field_value_1_3', function(){
        $current_user = wp_get_current_user();
        return $current_user->user_email;
    }); 
Viewing 1 replies (of 1 total)
  • The topic ‘Default Value’ is closed to new replies.