Get xprofile field data and insert it into input using jQuery
-
This is a little confusing but I have a search location input (aka input address) on my search form. I am trying to have that input auto-populated with the data from the users ‘zip code’ field so the user never has to enter their zip code/address.
My thoughts to accomplish this would be getting the zip code xprofile data (
bp_get_profile_field_data('field=Zip Code&user_id='.$user_id);
) and somehow entering that into jQuery ($('$address_input').val('zip_code_data')
). My issue is I’m not sure where/how to get the xprofile data and how I would add the data to jquery.
- You must be logged in to reply to this topic.