Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Manually validating correctness of profile field

  • mush22
  • mush22
  • OFFLINE
  • Posts: 32
  • Thanks: 2
  • Karma: 0
11 years 3 months ago #231244 by mush22
Hello,

I am trying to find a solution to a problem I am facing. I tried searching the forum and was not able to find help.

My queries are two.

1) I have one drop down field in the profile that, I would like, according to the answer to display different drop drown possibility on the next fields. This way I can narrow the choices for the user.

2) Currently, in the profile, I have a dropdown field that indicates a category a user belongs to. By filling in this category the users are automatically assigned to a user group (CB Auto Action). Since belonging to a group gives access to elements which are reserved for the group. I would like to add a manual check to this in order for users not to assign themselves to other groups and viewing what they should not.
My solution would be to assign various "category managers" which basically get notified according to the answer to the field. If from their records the user actually belongs to this category they will accept their entry otherwise they will reject it and the user will find the field empty and will have to fill it in correctly. I would like this to be differentiated from the Joomla new registration acceptance which is managed by an admin. But to work in a similar way. It will trigger notification both if the user is registering and if he/she is updating their profile.

I think that point 1 can be done easily maybe with CB auto actions, I have tried but was not able.
I am looking for suggestions for point 2. I imagine that doing exactly what I described with current plugins will be impossible, but I hope doing something very similar that can help me guarantee that the user is entering true information through a manual check will be possible.

Thank you very much for your always kind support!

Mike

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago #231264 by krileon

1) I have one drop down field in the profile that, I would like, according to the answer to display different drop drown possibility on the next fields. This way I can narrow the choices for the user.

You can do this with CB Conditional. Edit your first dropdown then set it to conditional others. You can then select what field options to show/hide based off its value. If you mean to show/hide other fields entirely then edit those other fields and use conditional self to condition based off your fields value.

Please see the below tutorial regarding CB Conditional usage.

www.joomlapolis.com/support/tutorials/107-use-cases/18336-using-cb-conditionals-to-hide-or-show-fields-or-tabs

There's also a video below, which may be of help.

www.joomlapolis.com/cb-conditional-short-review


2) Currently, in the profile, I have a dropdown field that indicates a category a user belongs to. By filling in this category the users are automatically assigned to a user group (CB Auto Action). Since belonging to a group gives access to elements which are reserved for the group. I would like to add a manual check to this in order for users not to assign themselves to other groups and viewing what they should not.
My solution would be to assign various "category managers" which basically get notified according to the answer to the field. If from their records the user actually belongs to this category they will accept their entry otherwise they will reject it and the user will find the field empty and will have to fill it in correctly. I would like this to be differentiated from the Joomla new registration acceptance which is managed by an admin. But to work in a similar way. It will trigger notification both if the user is registering and if he/she is updating their profile.

There is no field by field moderator approval feature. Best bet is to have the field set to Read Only or be moderator edit only using CB Privacy so it can only be edited during registration or with CB Privacy only be edited by moderators after registration.


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 or Create an account to join the conversation.

  • mush22
  • mush22
  • OFFLINE
  • Posts: 32
  • Thanks: 2
  • Karma: 0
11 years 3 months ago #231303 by mush22
Thank you very much Kyle,

Solution number 1 worked perfectly. I do not know why had not seen CB conditional before. It really does the job perfectly.

If there is no other way to proceed for field solution 2 I will try that. The only problem is that it may happen that a user may change from what category to another and is authorized. This is why the notification possibility came in handy. I did not go through CB Privacy very well. Can the editing by moderator happen on the front end? Where the moderator can go on the profile page of the particular user and edit the field? I will try and go through the CB Privacy forum and look for some documentation. I know that probably there is no other solution but if it comes up or if you want me to explain better the purpose of this please let me know.
Thank you very very much,

Mike

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago #231332 by krileon

This is why the notification possibility came in handy.

You can use CB Auto Actions to send an email if the field has changed, but that's just to let you know it changed and isn't moderation or anything of the sort. This is done by having a conditional compare var1 to var3 on the after profile update trigger. Example conditional as follows.

Type: Email
Trigger: onAfterUserUpdate
Access: Everybody
Conditional: [var1_cb_text] Not Equal To [var3_cb_text]

Can the editing by moderator happen on the front end? Where the moderator can go on the profile page of the particular user and edit the field?

Yes, install and enable CB Privacy. Next edit your field and set its edit display to moderator only.


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 or Create an account to join the conversation.

  • mush22
  • mush22
  • OFFLINE
  • Posts: 32
  • Thanks: 2
  • Karma: 0
11 years 3 months ago #231370 by mush22
Hi Kyle,

Thank you very much for the suggestion of CB Auto Action it is very helpful even though it will not work together with the read only option I guess.

I have played around with CB Privacy, I was able to set the field to read only for a normal user and allow him to edit only at registration. I set the cb privacy to edit display moderator only. Now i am a bit confused how do I set a moderator for editing this field? I tried logging in as super user but I am not able to edit the normal users field.

I also noticed that the user cannot see the field at all when editing the profile and may think it does not exist. It is not possible to include it when editing the profile but not be able to edit? This is because this field now depends from the field above and when the field above changes the options of the read only field should change as well. I do not think this is possible so I am thinking of assigning various moderator to different users I would like to do this on the basis of a common field they have as I was saying in my first post. In order for the moderator to select the appropriate answer for the read only field. If the user has to change the answer he/she will get in contact with the moderator who has the authority to do the change. Could this be a possible solution?


CB conditional is not compatible with core fields Ajax, correct?

Thank you very much for your time,

Mike

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 3 months ago #231389 by krileon

even though it will not work together with the read only option I guess.

Correct, read only does not have a POST so no value is sent.

I have played around with CB Privacy, I was able to set the field to read only for a normal user and allow him to edit only at registration. I set the cb privacy to edit display moderator only. Now i am a bit confused how do I set a moderator for editing this field? I tried logging in as super user but I am not able to edit the normal users field.

Don't use Read Only and CB Privacy moderator edit only at the same time. Use either/or. For your situation set it to moderator edit only, but don't set it to read only.

I also noticed that the user cannot see the field at all when editing the profile and may think it does not exist.

Correct, that's what moderator edit only does.

It is not possible to include it when editing the profile but not be able to edit?

No.

This is because this field now depends from the field above and when the field above changes the options of the read only field should change as well.

If you're using conditionals then read only or moderator edit only probably won't work well as there's nothing to condition against now.

I do not think this is possible so I am thinking of assigning various moderator to different users

CB has no feature to do this.

I would like to do this on the basis of a common field they have as I was saying in my first post.

You can probably try using a Redirect action on the before profile edit display trigger and redirect away if the user isn't the profile owner or if they don't have a that common field. I've provided and example of this somewhere already, please search.

In order for the moderator to select the appropriate answer for the read only field.

Read Only fields can only be edited from backend.

If the user has to change the answer he/she will get in contact with the moderator who has the authority to do the change

You could use Joomlas built in contact component for users to contact moderators, etc.. and request a change or navigate to the moderators profile and use the email form via email field.

CB conditional is not compatible with core fields Ajax, correct?

They work fine together, but please understand the more you add to it the more complicated it gets and the more complicated it gets the more risk of problems. Try to think long and hard how you want things to flow together and ensure it makes absolute sense as you could end up confusing your userbase with your current workflows as that's a lot of manual work just to change profile type for example and maybe better to just let them freely change it.


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 or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum