Skip Navigation

[Resolved] Two user role having access to different custom fields in the same post type

This support ticket is created 5 years, 11 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 5 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#1162147

Tell us what you are trying to do?

I want to create two different user role (Speech-Therapist-free and Speech-threapist-piad) having access to the same post type (Speech Therapist listing). I want the paid user can edit only 3 custom fields in the Speech Therapist post type, and the paid user can edit all the custom fields in the same custom fields group.

Is there any documentation that you are following?

I read this (https://toolset.com/documentation/user-guides/access-control-for-user-fields/?utm_source=access&utm_medium=admin-tabs&utm_term=Access%20Control%20for%20Fields&utm_campaign=access)

Is there a similar example that we can see?

Unfortunately I do not know similar english speaking sites?

What is the link to your site?

hidden link

#1162489

I want the paid user can edit only 3 custom fields in the Speech Therapist post type, and the paid user can edit all the custom fields in the same custom fields group.
Are your Speech Therapists editing posts in wp-admin, or on the front-end of the site using Forms?

In wp-admin:
This is not possible in Toolset. The only way to restrict fields by User role is to per field groups. If the fields are in the same group, you cannot set different permissions for different User roles. You must create two separate field groups and restrict fields in an entire group using Access.

In Forms on the front-end:
You can use Access Control shortcodes in a Form to hide input fields based on User role. Here is an example:

[toolset_access role="Guest" operator="deny"]
	<div class="form-group">
		<label>Guests will not see this field</label>
		[cred_field field="post_content" output="bootstrap"]
	</div>
[/toolset_access]

See our documentation for Access Control shortcodes here: https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/