Start a new topic
Answered

Adding Google Places API Place ID to Member Contact Details

I was told if I want to store additional information about members, that I could add the field on the form. I added it to the contact form and changed display to 'N'. I can now go to edit their details and the information is there to edit. However it also displays when logged on as that member. I don't want them to be able to edit this or see it. Also, when I go to look at the member details in the admin section, it's not there.


I want to store additional fields for each member. PlacesID is one of them, but I also want to put additional fields. These fields will be imported during the member import .CSV document from my local database export. I need these details to be visible and editable only to admin, not the logged in member.


Suggestions?


Best Answer

i'm logged in as little caesars pizza. i went to the copied version of listing - contact that i added custom fields to. their data isn't there. when i go to the listing - contact page while logged in as little caesar's pizza, their data is there. all of my variable names are correct. how do i get it to pull the user's data? i don't want these custom fields on listing - contact as they arent for the end user to see.




My suggestion is to add a class to the ones you do not want to show. The Display is used to show or hide this field from the profile page in the frontend (When users are seeing your profile). It will not hide it from the actual member inside their respective member settings. To accomplish this, you could for example, add a class named "hideme" to the field and then apply the css with something like this:

 

.hideme {
    display:none;
}

 

This will hide it from the member AND the viewers.


1 person likes this

that works on their end. i guess the only way for us to see the info is a database export though, correct?

You could:


1. Go to your MySQL database I see the data there.

2. Do a form that contains the information you request. To tell the form what information to pull you only need to set the name of the "variable name" of a field in that form to the name of the Database Table column. So if you wanted to pull all the information for a particular user, and you wanted to know his or her state code, the variable name of the field would be "state_code" because that is the name of the column on the database.




1 person likes this

Okay, this might be a dumb question. I got the form created with state_code in it as a test. I called the form Private Company Details. Now I'm ready to view the form... When I click "Search/View" It doesn't have any results. When I click to add a new one, the counter goes up, but it still doesn't display anything. I also tried creating a new web page, but it doesn't give the option to display a form. How do I view this form and see the state for a particular member?

Hi Aaron, to follow you better, could it be possible for you to add screenshots on what you mean for each explanation mentioned. This way I can follow better and provide a better, concrete answer. Thank you friend and will wait for you if you can.


1 person likes this



Does anyone else have any ideas?

Hi Aaron, 


Thank you for your message.

Sorry for the late response. 


It's super easy to call the form in any page. 


Please follow these steps: 

1. Go to the admin and click on "Visit Website"


2. Go to the page where you want to have the form and click on "Edit this page"



Then click on the "Source Code" option <>



And use the variable name of the form.

For example: "Private"



In the source code please paste this code:

[form=variable name of the form]


For example: 

[form=private]


Then click on "Ok" and Save the changes. 


Your new form will be displayed. 


Please let me know if you have any question.

We're always happy to help.


Thanks! :) 


Okay thank you. I have it created, but it appears I don't have access to MySQL and CP. Could I please be granted access so that I may look into all the field values?

Okay, I got the access. I see all the custom fields are in the users_meta table... but how are they attached to their respective table? ie. i see an entry in there for places_api and it has a 'database' column letting me know it's supposed to be part of the users_data table. it also has a 'database_id' and a 'meta_id'. it's apparent this data is being stored, but it's not being attached to a member. and when i call things like city and state on the form and embed it into a page, then view the page while logged in as a specific member, it doesn't show anything. im at a loss of how to connect this new page with its form to a member. all i want is to be able to see a specific member's details with additional custom fields i have added to that member's record...


oh and thanks for the help so far. i think i'm almost done with this. :)

So when I upload 5 new members via CSV with places_api as a field, then i go to the users_meta table, i see them there. When I go to the contact details page, I see the correct places_api field with the correct information. Yay! But that's not where I want it. So I copied that form and put it on another page. I'm logged in as the member, the same way I viewed the contact details. No data is present. I went and found in edit form where you can choose a database and table to connect to so I set it to the users_data table with userd_id as the primary key. Nothing. So i went and clicked on edit form under the contact details form, the system form that works. All the database and table information there is blank! How does that form know to grab information from the users_data table and why won't my form get that same info? If I could get my new page with the copied form in it to show the logged in members data, I would be finished and we could close this thread. :(

When the system call the user_data table it will always check if the users_meta has ANY data related to it. This means that, unless you create a custom SQL query, the system every time it calls some information from the users_data, it will also concatenate the data found in the users_meta related to it. This applies to also other tables that have any information in the users_meta. Any call to the database has an additional query that joins any relevant information from the users_meta to the table called in the first place.


With that said, I would need an image to understand your last post. I would recommend creating a ticket (Tickets do not have to be about bugs, they can also be avoid advice of this type).

Answer

i'm logged in as little caesars pizza. i went to the copied version of listing - contact that i added custom fields to. their data isn't there. when i go to the listing - contact page while logged in as little caesar's pizza, their data is there. all of my variable names are correct. how do i get it to pull the user's data? i don't want these custom fields on listing - contact as they arent for the end user to see.



I created a ticket for you Aaron. Will close this now and we can continue work there.


1 person likes this