[SOLVED] Some fields 'required' for some plans but not all - issue with Profile Edit

9 years 1 month ago - 9 years 1 month ago #262308 by mike5151
I have a use case where the community has parents and children.

The child plans 'require' the completion of fields detailing the name of the child's parents.

In the Parents' plans we do not 'require' to know this information (obviously!).

This is dealt with at registration by 'hiding' the fields according to the plan type using 'workflows > hide fields at registration' .

However, if a parent or administrator wishes to edit any other fields in the parent's profile - for a change of address for example, then these (parent name) fields become mandatory.

How can I make fields mandatory at registration for certaim plans but not mandatory in profile edit?

Kind regards

Mike

Please Log in to join the conversation.

9 years 1 month ago #262384 by krileon
There's no way to toggle the required state of a field. The only way to have what you're wanting is to edit the user from backend and ensure "Fields Validation in User Management" is set to "No" within CB > Configuration > User Profile.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

9 years 1 month ago #262394 by mike5151
Thank you.

The ability to toggle 'required' according to plan would be a useful feature for the future!

Kind regards

Mike

Please Log in to join the conversation.

9 years 1 month ago #262408 by krileon
I agree, but it's not an easy feature. We have jQuery side validation for required state. PHP side validation for required state. Toggling both so they're in sync. Toggling the required icon as needed (a non-required field toggled to required doesn't even have the icon in the DOM). CB Conditional had it and it was a disaster (broke too much). It maybe considered again at some point in the future, but for now I don't see it happening.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

9 years 1 month ago #262412 by mike5151
Never thought it would be easy!

The workaround you have suggested will be fine.

Thanks Kyle.

Mike
The following user(s) said Thank You: krileon

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.213 seconds

Facebook Twitter LinkedIn