Auto fill in from from user logged in

Hi,
So im trying this plugin and created a user register account which includes Address.
I have a form i want so when the user logs in and opened this data form it auto fills in their details including from a drop down.
Ive tried alll documentation but it still doesn’t seem to auto fill in?

You can use merge tags to prepopulate fields from user meta. Here are the most usual ones:

If you have address fields saves to WordPress user profiles, you can include those too. You need to find out what their names are though. e.g. for WooCommerce, they have names like billing_address_1, billing_country, etc.

thanks for the reply.

So i have the user account created with gforms registration, I used the address field in the setup of the form.
Now i have another form that i want to logged in user date to auto fill in
i read the info here

but very confused. Whats the Field Name: of the original data? where can i find that.
I also have a drop down on the registration form that i want to show the as auto fill too what they selected in registration.
Any assistance appreciated. thanks

Did you map the separate subfields of the Address field to user meta records in a User Registration feed? e.g. Address line one to something like address_line_1, City to something like address_city, etc. If you did, then you can use the same names to prefill the fields on your other form, using merge tags like {user:address_line_1}, {user:address_city}.

Generally the only tricky bits should be the state / province and country subfields. If you’re taking the exact values from Gravity Forms, you should have no problem. If you’re trying to use some other values, like WooCommerce profile field values, you need a translation layer – I have a plugin for that :slight_smile:

If you’re not trying to integrate the user profile data with another plugin (like WooCommerce), then you should be able to do it all with Gravity Forms and its User Registration add-on.

1 Like

Hi ross.
I think ive worked out it all now.
Except i have a drop down selection in the registration, how do get that to auto populate.

this is the db save data for that drop down
INSERT INTO wp6n_gf_entry_meta (id, form_id, entry_id, meta_key, meta_value, item_index) VALUES
(164, 1, 12, ‘3’, ‘DVA’, ‘’);

How can i turn the dropdown or just a text field on a different form to auto populate this data of the logged in user.

Thanks
Stuee

To load from a WP user profile, you need to map it to save into user meta. On your User Registration feed, map a new key to your form’s field number 3. The drop-down list that says “Select Meta Key” has an option at the bottom of the list, “Add Custom Meta” which lets you type in your new meta key name. Make sure that your new meta key isn’t something that WP core or a plugin might use, e.g. by prefixing it – sliles_choice or something. You can then use that key when loading the value from the user’s profile – {user:sliles_choice}

1 Like