How would I go about having a profile page where the current user can have fields and buttons for editing their profile, but all a visitor would see is there completed profile? I imagine it would be similar to how facebook functions with profiles.
You need to define when the specific elements should be visible and when not individually.
In the element editor uncheck the âThis element is visible on page loadâ check box and then in the Conditional Tab of the editor define a condition of when it should be visible. Most likely it would be When Parent group user = Current User. Then in the dropdown select âThis element is visibleâ and check the box. Youâll need to this for each element that requires this and can copy the condition from one and paste to the others, just make sure you uncheck âvisible on page loadâ checkbox on each.
Ill give it a go. Thanks!
Also make sure youâve properly set up your data privacy settings to reflect who you want to see what. Theyâre essential.
I didnt even know about data privacy settings. Where do I start on that?
What @vini_brito says is true, but first just figure this out. (Hint: do the sending data to a page lesson.) Donât worry about that (Privacy Rules) right now.
Then, when you have your profile display/edit page working, youâll notice that everyone can see all the data about every user. You wonât want that when you have real users.
So, what will happen is this:
And then youâll want to come back here and ask how you stop that from happening. But instead, just read the manual and reference about Privacy Rules (found on the Data tab in your app).
And you can search the forum and read up on that topic as well.
But â until youâre able to make a page that actually displays anything at all â this isnât an issue, right?
I have the page displaying data from the âedit profileâ page, but instead of having an edit page full of inputs, I wanted to have the profile page displayed, but only that profiles owner/user can see the âedit profile photoâ button, or any other âupdate infoâ buttons.
Try doing as @keith said, do the lesson he mentioned and youâll be fine.
Ive done that lesson, several times lol. This is more of a displaying data to a certain user vs the public than sending the data to a page though, I believe.
OK then. So you understand that the profile page can display any user.
As was explained in a previous comment, you can know when the User displayed in the profile page is the User looking at the page like so:
Current User is Current Page User
⌠will be true (evaluates to âyesâ) when the Current User is looking at their own profile.
So now you just put whatever changes on your page that you want to have accessible to the pageâs âownerâ. You keep them hidden unless âCurrent User is Current Page Userâ.
This is simply the converse of what youâd do with a standard edit page, right? Letâs say you have some thing that the user creates like a Foo (and Foos should only be visible to their creator). You canât let anybody but the owner/creator of the Foo see the Foo or delete or modify the Foo. So on the edit_foo page, youâd have a condition that says âWhen Current User is not Current Page Fooâs Creatorâ and then a workflow step that would bounce them to the index or something.
Now letâs say that in fact Foos arenât secret and you want anybody to see a Foo (even a user who isnât logged into or signed up for your site). And youâd like to have everyone see a Foo, but only the Fooâs creator can edit it. And youâd like to just use the same page for displaying and editing Foos.
The data type for this page is now Foo. And youâd just evaluate this expression:
Current User is Current Page Foo's Creator
And when thatâs true youâd enable editing features for the pageâs Foo.
As you can see, what I just described is EXACTLY what weâre trying to do with our profile page. The only difference is that your profile page is not of type Foo. Your profile page is of type User.
Users do not have a Creator (they are created by the system). So the expression becomes:
Current User is Current Page User
And now we are no longer confused about âCurrent Userâ (which is just a metaphor for the entity viewing the page) and âCurrent Page Userâ (which we now see is simply the object â in this case of User type â displayed in the page).
Man thank you so much for taking the time to type that out! Im going to rebuild my prof page and try to see if I can get it to come out.