Skip Navigation

[Resolved] One user profile page, two user edit forms

This support ticket is created 4 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 7 replies, has 2 voices.

Last updated by Arrien 4 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#1646615

Hello,

I hope you are well during these uncertain times.

I am trying to set up a user profile editing page. I have two user types. Individual and Group. I have created user edit profile form for them and have placed them both on a Member Profile page. Previously with Access, you could wrap content in a shortcode to restrict it based on who is logged in. How does one do this with the new block editor?

https://toolset.com/learn/create-membership-site-wordpress-using-toolset-plugins/restricting-access-certain-parts-posts-pages/

Thank you

#1646949

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-06-01 at 3.15.23 PM.png

Hi Arrien,

Thank you for getting in touch.

I'm assuming that you are referring to how you would restrict specific blocks correct?

Unfortunately you're not able to do this with our Access plugin, however you can make use of our Conditional block that you can check to see if the User id is not equal to empty. See Screenshot

If no user ID exists then this will consider it as the user being Logged out.

Please let me know if this helps.

Thanks,
Shane

#1649151
conditional_user-edit.PNG

Hi Shane,

Thank you for getting back to me.

I am trying your conditional display idea. It seems as it could work. I've tried this, but it doesn't seem to show the form when an Individual member is logged in. Am I not using the right conditions?

Thanks

#1649293

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Arrien,

Would you mind allowing me to have a look at this for you?

The private fields will be enabled for your next response. Also please send me a link to the page where the form is on.

Thanks,
Shane

#1649323
conditional_user-edit_v2.PNG

Hi Shane,

I am currently developing the site locally, so I can't give you access at this time. I guess what I would like to understand is what conditions do I need to set so that when an "Individual" user logs in that the conditional block shows content that is for them? I would think that doing what is in the attached image would work, no?

#1649345

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-06-03 at 10.43.34 AM.png

Hi Arrien,

What you can do is to enable the debug mode for the block and you can see what exactly is wrong. See Screenshot.

Once you have done this please let me know if you are able to see the debug information on the frontend.

Thanks,
Shane

#1649557

Hi Shane,

This is the message I get from the debug mode on the front-end:

####################
wpv-conditional attributes
####################
Array
(
[if] => ( ( 'individual_member' = 'individual_member' ) )
[debug] => true
)

####################
Debug information
####################
--------------------
Original expression: ( ( 'individual_member' = 'individual_member' ) )
--------------------
After replacing 1 general variables and comparing strings: ( ( 'individual_member' = 'individual_member' ) )
Comparing individual_member to individual_member

#1649577

My issue is resolved now. Thank you!

My Access settings for each user type was not set correctly.

When I set the conditions like this:

Current user role = Other role > Group Member

And set the Access controls properly, it worked. Now depending on which user logs in, they only see the form that applies to them.