Support

  1. Thomsterdam
  2. Support
  3. Monday, July 25 2016, 03:41 PM
Ciao,
I have added a condition to two fields, one is a 'radio' field, the other a 'checkbox' field. The condition is: if a certain value is clicked by the user, (s)he will be added to a user group. So, if field value equals 'xxx' add to usergroup 'aaa'.

What if the user changes the field, e.g. (s)he chooses value 'yyy', is (s)he then removed from the user group and added to another user group? Or should I add a condition?
And does this work the same way on radio fields as on checkbox fields? Or does it work differently?

Grazie,


Thom
admin Accepted Answer
Admin
Hi,
conditions have 2 ways, then conditions works so:
if equal to custom value "aaa" add to usergroups "UG Test" otherwise remove from usergroups "UG Test"

And does this work the same way on radio fields as on checkbox fields? Or does it work differently?
Yes, but there is a difference, checkbox allow multiple values so something like "equal" works only when 1 option is selected, for example:
I have these options:
X Option 1 (Checked)
X Option 2 (Checked)
- Option 3
- Option 4
This is not equal to "Option 1", This is Equal to "Option 1,Option 2". So we recommend to use "contain" instead "equal"
So, result is
- Equal to "Option 1" - FALSE
- Contains "Option 1" - TRUE
  1. more than a month ago
  2. Support
  3. # 1
Thomsterdam Accepted Answer
Ciao,
I'm coming back to this one... Since I first asked this questions, Easy Profile has changed: you now support "Two Ways" conditions. I may misunderstand the concept, but you'll be able to see underneath:

I want people to change from one User Group to another if they change the value in a Radio Field.

I'll to explain in great detail what I have done and what I would like to happen:
1. I have made a Radio Field with regional options: "In which region do you live?" Users can then choose their region:
____________
mid|Midden
noo|NoordOost
nwe|NoordWest
oos|Oost
vmo|Vrouwen Midden/Oost
zwb|Zeeland/West-Brabant
zui|Zuid
zwe|ZuidWest
____________
(You can guess the meanings: Midden=Middle, NoordOost=NorthEast, etc.)
2. Then those regions correspond with User Groups, so In the condition of the Radio Field, I have configured the first Condition in this way (see image 20160906_Easy-Profile_Condition.jpg):
____________
Operator: Equal
Compare with: Regio
Custom Value: mid
Two Ways: Yes
...
Add to Usergroup: Midden
Action: Add to usegroup
____________
So if someone selects "mid" in the field Regio, I want them to be added to the user group "Regio Midden" and deleted from all other groups.

3. Then I made conditions for all other groups, so people would be added to their groups if they chose one of the options.

4. After that I made Reverse Conditions:
If you choose another group, you will be removed from group "Midden" (see 20160906_Easy-Profile_Reverse_Condition.jpg):
____________
Operator: Equal
Compare with: Regio
Custom Value: mid
Two Ways: Yes
...
Add to Usergroup: Regio NoordOost, Regio NoordWest, Regio Zeeland/West-Brabant, Regio Zuid, Regio ZuidWest, Vrouwen Regio Midden/Oost
Action: Remove from usergroup
____________
Now if a user (who is member of the User Group NoordOost) selects Midden in the Radio Field, the Region Field is of course displayed as Midden, but s/he is only removed from the usergroup NoordOost but not added to the user group Midden.

Can you explain what I am doing wrong? And how to do it right?

Thanx,

Thom
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
seems you have 2 issues in your conditions

1) parameter "Compare With", now your field value is compared with another fields called Regio. I think you want to compare with Custom value like "mid"

2) In condition you have set "Two Ways" to "Yes", this is good, so you do not need to create a second conditions to remove from usergroups.
How to works Two Ways? see this example on your first condition (your first screenshot)
if equal to custom value "mid" then add to usergroups "Regio Midden" otherwise (this is two ways effect) remove from usergroup "Regio Midden"

So you can configure 8 conditions:
Condition 1
Operator: Equal
Compare With: Custom Value (you need to fix it)
Custom Value: "mid"
Two Ways: Yes
Add to usergroup: "Regio Midden"


Condition 2
Operator: Equal
Compare With: Custom Value (you need to fix it)
Custom Value: "noo"
Two Ways: Yes
Add to usergroup: "Regio NoordOost"

.........
  1. more than a month ago
  2. Support
  3. # 3
Thomsterdam Accepted Answer
Ciao,

This is wonderful. It works like clockwork. Molto Grazie.

Now I wanted to do the same for a checkbox field. The regions in the questions above are mutually exclusive. If you live in one area, you do not live in the other. Now with the checkbox field people have a choice what group(s) they want to be part of. So you can be a young person (Jongeren) ánd belong to the cycling group (Fietsgroep) or none of them at all.

So I did everything exactly the same, but, alas... it didn't work. When they select a box or uncheck one, they are not added to or deleted from the Joomla usergroup in the condition.

I guess things work differently with checkbox conditions. Do they? Can you explain?

These are the groups, that you can or cannot be a member of:
jon|Jongeren (young people)
fie|Fietsgroep (cycling group)
rtl|RTL-C (train enthousiasts)
wan|Wandelgroep (walking group)

In the attachment you see the way I have made the condition for the first group and the others are exactly the same.

Can you assist me in solving the problem?

Grazie!


Thom
  1. more than a month ago
  2. Support
  3. # 4
admin Accepted Answer
Admin
Solution is here (reply in this post): https://www.easy-profile.com/support/remove-from-user-group-when-condition-is-no-longer-met.html#reply-13238

You need only to set in condition operator "Contains" instead "Equal" (see screenshot)
Attachments (1)
  1. more than a month ago
  2. Support
  3. # 5
Thomsterdam Accepted Answer
Hi there,
Thanx a lot.
I had focussed on the radio group so I had forgotten about your checkbox answer. But it works!

Grazie.

Thom
  1. more than a month ago
  2. Support
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.