1. Mbiyc
  2. Support
  3. Thursday, February 19 2015, 06:33 PM
I have a dropdown field that contains SMS Providers. I only want to show the dropdown if the user has entered a phone number in a Mobile Phone field. In the Easy Profile admin field edit I only see conditions that put a user in a user group. I do not see any conditions to show or hide fields.

I have Basic 1.3.4 installed.

Where do I find conditions for showing/hiding fields?

Do I need to do this in code with the skeleton plugin?
admin Accepted Answer
Admin
hi,
for each condition you can configure these parameters:
- target field
- target action

in your example on phone number field you can configure these rule
condition: equal
field to compare: custom value
custom vale: (leave empty)
target field: SMS provider
target action: hide

now: if phone number is equal to empty value hide SMS provider field.

condition have two way, so if condition is not met this rule automatically show SMS provider field
  1. more than a month ago
  2. Support
  3. # 1
Mbiyc Accepted Answer
Sorry, for the stupid question. When I looked at the Parameter tab, I only saw "condition Disabled" and one data field " Add to Usergroup" and did not change the condition dropdown as when I looked at the condition dropdown values I did not see empty. Now I see that if I set it to Equal, additional data fields appear.

For slow people like me, I would suggest providing a little more documentation on how the Parameter tab works.
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
hi Jim
this is not a stupid question, this is a problem fixed from 1.3.5. Add to usergoup should be hidden with the other parameter of conditions, this causes misunderstood.
  1. more than a month ago
  2. Support
  3. # 3
Mbiyc Accepted Answer
Thanks... One additional related question...

The Texting Provider dropdown properly displays and hides with changes to the Mobile Phone number fields as expected.

However, if I want to change the selected value of the Texting Provider dropdown back to the default value (0 in this case) when the user clears the Mobile Phone number, I would have to do this via the Skeleton Plugin, Yes?
  1. more than a month ago
  2. Support
  3. # 4
admin Accepted Answer
Admin
hi, yes this is a good workaround.
  1. more than a month ago
  2. Support
  3. # 5
Mbiyc Accepted Answer
Installed the Skeleton Plugin, commented out the examples and added:


public function triggerProfileUpdate($user,$data,$changed,$isNew){
if(!$isNew && in_array('contact_mobile_phone',$changed))
{
if(empty($data['contact_mobile_phone'])){
$data['texting_provider'] = 0;
}
}
}


Works great and was very Easy!

I also tried:


public function triggerFieldContact_mobile_phoneUpdate($user,$data,$changed,$isNew){
if(!$isNew)
{
if(empty($data['contact_mobile_phone'])){
$data['texting_provider'] = 0;
}
}
}


and it worked just as well. I decided to go with the triggerField version... Thanks...
  1. more than a month ago
  2. Support
  3. # 6
admin Accepted Answer
Admin
Hi,
in the next version we will add a reset of field hidden by conditions, so from version 1.3.7 (one week) you can disable/uninstall your plugin.

We think is the best thing, otherwise this could also create problems with the condition of the user groups.
  1. more than a month ago
  2. Support
  3. # 7
Mbiyc Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 8
admin Accepted Answer
Admin
Hi,
what version you had before? and which version you updated?

Joomla 3.2+ Work only on PHP 5.3.10+, we use PHP 5.4 and no problem also with skeleton plugin.

from 5.4 and 5.5 there are no difference for the code: http://php.net/manual/en/migration55.incompatible.php
  1. more than a month ago
  2. Support
  3. # 9
Mbiyc Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 10
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.
Sorry, the discussion is currently locked. You will not be able to post a reply at the moment.