What I'm trying to do is:
- have an administrator add basic info about a registered user (name, email etc)
- user can edit that info, and also add additional info (research interests, mentors etc) They can only edit their own info and no one elses
tried to read your documentation, but got even more confused. I'm not sure if this is a post form, user form, not a form at all, or maybe a wp-access issue.
thank you
You need Toolset Forms and Access for this.
1. Create a User Form to edit the user role of your choice
2. In Toolset > Access > Toolset Forms make sure Administrators can edit all users with this form, and the users of the role that the form edits, can edit only their own data (set all capabilities you need for each user role for the form)
3. Insert this Form where the users can reach it, and pass the proper User ID to edit with. Likely you want to create a View, that lists all users, and then either add the Edit user Form in the View Loop or link to it, for each user in the View loop.
To create User Forms, you can follow this DOC:
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-registering-users/
https://toolset.com/documentation/getting-started-with-toolset/publish-content-from-the-front-end/forms-for-editing/
To control those with Access, you can follow this DOC:
https://toolset.com/documentation/user-guides/access-control/access-control-for-cred-forms/
For Views, instead, you can follow the same DOC as when creating Views for Posts, just, you'd select users in the query selection of the view:
https://toolset.com/documentation/user-guides/views/
One problem I was having was creating a custom role. I found that under, Toolset > Access > Custom Roles (which now seems obvious)
Here's what I did:
1. create custom role
2. assign role to existing user
3. create User Form with:
Form Type: Edit existing user
Role of the user to create/edit: custom role
4. toolset >access > toolset forms give access to new role for "User Forms Frontend Access"
The form seems to work, BUT I want to include custom fields (you call them "Generic Fields") in the form such as "research interest" and "mentors" among other things. I add the custom fields in the form, but they are not stored in the database. How do I get custom fields to be a part of the form and get that data stored in the db and associated with the user?
This is not related to the question about how to let users edit their information, or letting other users such as admins edit other users information.
Please if possible open one ticket for each issue.
The issue of Generic fields is not related either to letting users edit other or their own information.
We need to solve each issue in one ticket, so to avoid confusion, and enable speedy response.
To add fields to a Form that persist, you simply add Fields (wether for posts or users) in Toolset > Custom Fields.
Those then will appear in the forms (you may want to add them if the form already exists, manually when editing that form).
Generic Fields are only for "on the form", they don't save data anywhere.
So to get the data stored, you need to create real User Fields, in Toolset > Custom Fields > User Fields.
I hope this helps - please open a new ticket if other issues arise, so we can help promptly and on point.
Thanks!
Sorry you are right, this is not about how to let users edit their information, or letting other users such as admins edit other users information. I asked two questions at once, my bad. In the future I will open a new ticket for additional questions. I appreciate your help, thank you!
No issue at all, it's merely an organizational question 🙂
Is the problem which we handled here so far solved?
If so, then we can close this here as "fixed".
If you want I can have a look at your other ticket to, once you open one, you can link to it from here so I can check 🙂
Thanks!
My issue is resolved now. Thank you!