CB Conditional + CB Auto Actions
- pierre2bzh
- OFFLINE
- Posts: 12
- Thanks: 0
- Karma: 0
I have 2 problems and I whish to know if it is possible to easyly fix them with CB before buying CB...
I have a lot of user's groups.
For instance:
- group 1
-- subgroup 1.1
--- subsubgroup 1.1.1
--- subsubgroup 1.1.2
--- subsubgroup 1.1.3
-- subgroup 1.2
--- subsubgroup 1.2.1
--- subsubgroup 1.2.2
--- subsubgroup 1.2.3
-- subgroup 1.3
--- subsubgroup 1.3.1
--- subsubgroup 1.3.2
--- subsubgroup 1.3.3
- group 2
-- subgroup 2.1
--- subsubgroup 2.1.1
--- subsubgroup 2.1.2
--- subsubgroup 2.1.3
-- subgroup 2.2
--- subsubgroup 2.2.1
--- subsubgroup 2.2.2
--- subsubgroup 2.2.3
-- subgroup 2.3
--- subsubgroup 2.3.1
--- subsubgroup 2.3.2
--- subsubgroup 2.3.3
... and so on and so on and so on...
1) During the registration, I want people can choose a usergroup (only in an authorized list of groups I need to choose, of course). Some scripts for Joomla do that but with a unique field. I can not imagine having only a unique field where people have to select the subsubgroup because the list is really too long!! So I want to create conditional fields:
Group -> Group1, Group2
If people select Group1, then a new line appears with the list of the Group-1's subgroups. And same thing for the subsubgroups.
Is it possible to cumulate both scripts (CB conditional + CB auto actions) like that to do that?
2) My first question was about the registration's form. But I want people can change their usergroup (in a list of authorized groups again, of course! ). Is it possible to do that with the same add-ons, after the registration, with a link in the menu who leads to the form or, better, with conditional fields in the user's profil?
Thank you very much for considering. If it is possible to do both, I really think I will subscribe a professionnal plan!
Have a great day,
Pierre
NB: I read for Joomla 1/2. But I have Joomla 3.5. It will work with if you buy a professional plan with the last version of CB?
Please Log in or Create an account to join the conversation.
- nant
- ONLINE
- Posts: 25532
- Thanks: 1834
- Karma: 877
pierre2bzh wrote: Hi everybody!
I have 2 problems and I whish to know if it is possible to easyly fix them with CB before buying CB...
First of all there is only one Community Builder and it is free.
Paid membership just gives you more add-ons that you can install over Community Builder.
I have a lot of user's groups.
For instance:
- group 1
-- subgroup 1.1
--- subsubgroup 1.1.1
--- subsubgroup 1.1.2
--- subsubgroup 1.1.3
-- subgroup 1.2
--- subsubgroup 1.2.1
--- subsubgroup 1.2.2
--- subsubgroup 1.2.3
-- subgroup 1.3
--- subsubgroup 1.3.1
--- subsubgroup 1.3.2
--- subsubgroup 1.3.3
- group 2
-- subgroup 2.1
--- subsubgroup 2.1.1
--- subsubgroup 2.1.2
--- subsubgroup 2.1.3
-- subgroup 2.2
--- subsubgroup 2.2.1
--- subsubgroup 2.2.2
--- subsubgroup 2.2.3
-- subgroup 2.3
--- subsubgroup 2.3.1
--- subsubgroup 2.3.2
--- subsubgroup 2.3.3
... and so on and so on and so on...
I assume these are Joomla groups you have manually created in Joomla backend?
1) During the registration, I want people can choose a usergroup (only in an authorized list of groups I need to choose, of course). Some scripts for Joomla do that but with a unique field. I can not imagine having only a unique field where people have to select the subsubgroup because the list is really too long!! So I want to create conditional fields:
Group -> Group1, Group2
If people select Group1, then a new line appears with the list of the Group-1's subgroups. And same thing for the subsubgroups.
Is it possible to cumulate both scripts (CB conditional + CB auto actions) like that to do that?
Easiest way to do this is a CB Query field (assuming you actually know the SQL query to grab the groups from the database in Joomla). As this might not be easy (I cannot do it), it might be easier to just maintain an extra database table with the names of these groups and query it using CB Query fields.
See the latest tutorial below with State, city, zip example to get the idea:
www.joomlapolis.com/support/tutorials/107-use-cases/18533-configuring-dynamic-usa-state-city-zip-fields-with-cb-query-field-plugin
After that you can use a series CB Auo Action to condition off the selected fields (using CB Query) to add user to your specific Joomla group.
CB Query field and CB Auto Actions are part of the Professional membership ad-ons.
2) My first question was about the registration's form. But I want people can change their usergroup (in a list of authorized groups again, of course! ). Is it possible to do that with the same add-ons, after the registration, with a link in the menu who leads to the form or, better, with conditional fields in the user's profil?
You can trigger your auto actions based on registration triggers or profile update actions.
I guess you might need to clone your CB Auto Actions and change conditions to only execute when your CB Query field value changes.
Thank you very much for considering. If it is possible to do both, I really think I will subscribe a professionnal plan!
Have a great day,
Pierre
Having replied to your exact questions, I am not really sure of your use case. You might want to consider for example CBSubs as a solution depending on what you are trying to accomplish in the long run with all these Joomla groups.
Maybe all you need is CBSubs membership plans as with CBSubs you can give people access to specific joomla content just based on the CBSubs plan subscription a user has.
NB: I read for Joomla 1/2. But I have Joomla 3.5. It will work with if you buy a professional plan with the last version of CB?
All latest versions work with latest Joomla 3.4.x release and perhaps with old Joomla 2.5 (no guarantees) - No Joomla 1/1.5 support exists.
--
Nick (nant)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Tutorials + Search the forums
For more add-ons and support: Upgrade your membership
Links: Community Builder - Languages - Adv/Pro/Dev membership - CBSubs Paid Subscriptions - GPL Templates - Hosting
Visit my CB Profile - Send me a Private Message (PM)
Please Log in or Create an account to join the conversation.
- pierre2bzh
- OFFLINE
- Posts: 12
- Thanks: 0
- Karma: 0
Why do you suggest to use CB query rather than CB conditional? I understood that with CB conditional we could do conditional fields.
You're right, I created manually the different groups
So you suggest I create a new database with the different groups, subgroups and subsubgroups? It seems too complicated to use conditional form (even with cb query) with the existent groups, subgroups and subsubgroups?
Thanks
Please Log in or Create an account to join the conversation.
- pierre2bzh
- OFFLINE
- Posts: 12
- Thanks: 0
- Karma: 0
In the screenshot, every propositions seem to be listed (not sure because it Is only a pic). I don't want that, I would prefer a first field where people choose a group. As soon as he click on the group, a second line with a field with subgroups corresponding to the previous choosen group. And when people select a subgroup, it opens a third line with the field subsubgeoup.
And I want That it put people in the correspondant group (group->subgroup->subsubgroup.
Do you think it is possible?
Please Log in or Create an account to join the conversation.
- pierre2bzh
- OFFLINE
- Posts: 12
- Thanks: 0
- Karma: 0
It seems to do what I want, excepted That lines doesn't appear one by one. Is it possible to change it?
My last (I hope, haha) question is:
Some of m'y subgroups or subsubgroups have the same name.
For instance:
New York
- Store
-- grocery
-- pharmacy
- Bank
-- Bank of America
-- Chase
Miami
- Store
-- grocery
-- pharmacy
- Bank
-- Bank of America
-- Chase
This Is only an example. Some subsubgroups have the same name (but a different root, of course!). With CB auto action, how dors it work? Because with my previous fields, the last field is only the subsubgroup name. So how can CB Auto Action work in This case? Because it can not correctly assign a group from the last field (subsubgroup) because a lot of subsubgroups have the same name. Is it possible to do if group field =X AND subgroup field = Y AND subsubgroup=Z, so add the user in the group with the root X->Y->Z ?
Please Log in or Create an account to join the conversation.
- nant
- ONLINE
- Posts: 25532
- Thanks: 1834
- Karma: 877
With CB Query you can formulate your own SQL statement to pickup field options from a database.
If you want you could directly access the Joomla database tables that contain the names of the groups. I am not an SQL expert, so I could not even begin to help you as the SQL would have to join and filter perhaps multiple tables.
This is why I proposed you replicate the structure somehow so you can handle easier.
Not much more I can offer here - the tools are there and you would just have to make use of them with the propoer SQL statements.
--
Nick (nant)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Tutorials + Search the forums
For more add-ons and support: Upgrade your membership
Links: Community Builder - Languages - Adv/Pro/Dev membership - CBSubs Paid Subscriptions - GPL Templates - Hosting
Visit my CB Profile - Send me a Private Message (PM)
Please Log in or Create an account to join the conversation.