Skip Navigation

[Resolved] Custom user fields when member access levels change

This support ticket is created 7 years, 2 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by andrewB-7 7 years, 2 months ago.

Assisted by: Beda.

Author
Posts
#485763

Hi there,

I hope you can help me with this question.

The site I am creating will have three membership user roles:
- Beginner
- Intermediate
- Expert

I want to create custom user profiles for each member role level. And for these to be edited on the front end using CRED forms. This part I have been able to do.

However, where I need support is as follows:

Say that a member signs up initially at 'Intermediate' user role. They will fill out their user profile on the front end, including information in some custom user fields. An example would be the 'Twitter url' field.

What I need to happen is this...when that user changes their role by upgrading to the 'Expert' level...I need that 'Twitter url' field to go with them. So that they don't have to fill out a whole new user profile when they upgrade.

So, is it possible to have some fields on a user profile apply to all user role levels, and have some which are specific to only some user role levels. So the ones which are consistent between roles retain the data when membership level is changed?

I hope you can help, and thank you very much for your time.

Very best wishes,
Andrew

#485894

It's not possible with Toolset natively to "upgrade" an User to another Role, unless you use a Custom Function.
The function I elaborated here:
https://toolset.com/forums/topic/upgrade-like-toolset-my-account/#post-484435

That Function example does upgrade an User from Role A to Role B on form submit.

To port over User Field Values, this will not be necessary as it's still the same user, so the Fields are still there.
If you hide/show fields conditionally to Roles, you need to make sure to have as many User Field Groups as you have User Roles.

Then, on the First Field Group, you create only the Fields that apply for Role A
On the Second group, you create as example the fields that can also be in Role B
On the third group, you create all the fields that can be in all user roles.

This way, when updating the User Role, the fields that can stay in all roles, or both, will still be visible, and the others will be gone.

#486369

Thank you. I think I understand. I will have a look and see if I can get this to work.

#486530

Sure, let me know if you need further details.

#486577

Thanks again.

I have marked this as resolved, and will come back to it if any issues arise.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.