Skip Navigation

[Resolved] Conditional User Meta setup

This thread is resolved. Here is a description of the problem and solution.

Problem:

The admin has two forms in the front-end. One form is for creating new users and the other form is for editing existing users. It would be cool to be able to select a user in the edit form. I only have the possibility to edit the logged in user.

Solution:

Please try these:

https://toolset.com/forums/topic/conditional-user-meta-setup/#post-2045553

Relevant Documentation:

https://toolset.com/course-lesson/using-forms-to-create-an-edit-your-profile-page/

This support ticket is created 3 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 3 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2044383

Hello all,

I need some help with Conditional and Custom Fields.

Using front-end forms, the admin is supposed to customize other users with custom fields. Is there a way to show all users and if so how?

The admin has two forms in the front-end. One form is for creating new users and the other form is for editing existing users. It would be cool to be able to select a user in the edit form. I only have the possibility to edit the logged in user.

Is there any way to style the form? Unfortunately I can't find a way to do this. We are working with Kadence Theme and Blocks.

best regards
Patrick

#2045553
all-users.JPG
user-form-shortcode.JPG
user-query.JPG

Hello,

Please try these:
1) Follow our document to setup a user form "edit-user" for editing user:
https://toolset.com/course-lesson/using-forms-to-create-an-edit-your-profile-page/

2) Enable classic view editor:
Dashboard-> Toolset-> Settings-> General, in section "Editing experience", enable option "Show both the legacy and Blocks interface and let me choose which to use for each item I build"

3) Dashboard-> Toolset-> Views
Create a new user view "all-users":
- Query WP users, see my screenshot user-query.JPG
- In section "Loop Editor", views loop, display the user form's shortcode with user's ID, for example:

[cred_user_form form='edit-user' user='[wpv-user field="ID"]']

See my screenshot user-form-shortcode.JPG

4) Create a new page, display above user view shortcode, if you are using Blocks editor, you can add a new "Field and Text" block:
https://toolset.com/block-item/fields-and-text/
and insert the user view shortcode into it, see my screenshot all-users.JPG

[wpv-view name="all-users"]

And you can follow our document to style the Toolset form with custom CSS codes
https://toolset.com/course-lesson/styling-front-end-forms/

#2068723

Hey Luo,

thank you for your instruduction.
But is there also a way that a specific user role can be edit?

I want to have to possiblity that admins can be edit in the front end.

Thank you

New threads created by Luo Yang and linked to this one are listed below:

https://toolset.com/forums/topic/i-want-to-have-to-possiblity-that-admins-can-be-edit-in-the-front-end/

#2072273

I assume the original question of this thread is resolved, for the new questions, please check the new thread here:
https://toolset.com/forums/topic/i-want-to-have-to-possiblity-that-admins-can-be-edit-in-the-front-end/