HI

I will like to congratulate you on a good job done with the conditional fields module. I am using it in my site where i have a multi level conditional fields at work and the dependents do not hide when the top level dependents change. This is what i have at work

i have a select list called offer made up of sale option and Type of lease. sale option has its own values which are instant payment and installment payment. I have fields such as selling price which depends on Instant payment , and instant payment depends on sale option.

as indicated below

Offer =>1=>For sale=>1.a=>Instant Payment====>1.a.I=>Selling prices

==============>1.b=>Installment Payment=>1.b.I=>Initial deposit
=================================>1.b.II=>Rest payable in Month or year option

====>2=>For Lease=>2.a=>Monthly Lease=====>2.a.I =>Monthly Lease Cost
==================================>2.a.II =>Monthly Lease Duration

===============>2.b=>Annual Lease=====>2.b.I =>Annual Lease Cost
==================================>2.b.II =>Annual Lease Duration

The dependency is such that under the [offer] select list, if you select [for lease] you will be prompted to chose either [monthly lease] or [annual lease]. if you select [annual lease] then the fields [annual lease cost] and [annual lease duration] will show for you to imput your values.

My problem is that when i change the top level dependee from [for lease] to [for sale], the dependents of [for lease] and [annual lease] still show but they should go back to being hidden.

Than means once the conditions have been evaluated from top to the bottom, once the top changes the conditions are not reset but are kept and the new conditions are evaluated on the old one.

What can be done so that when the top condition changes the condition state are resets and the conditions are re-run from top to bottom again

Hope you understand my multi level dependency structure and the need for a reset function to occur any time the top condition is changed

Thank you and waiting for your reply

Comments

peterpoe’s picture

Assigned: docans » Unassigned
Category: bug » support
Priority: Critical » Normal
Status: Active » Fixed

You could try applying the "topmost" dependency to all dependent fields, even those not directly dependent.
That is, if you want to show field B if field A is "foo", and field C if field B is "bar", you should set up 3 dependencies:
- B is visible when A is "foo"
- C is visible when A is "foo"
- C is visible when B is "bar"
Hope that helps!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

docans’s picture

NO. It still does not work, Any other options

Thank you

docans’s picture

Issue summary: View changes

correction

gaurav_drupal’s picture

Same Issue, any fix for that ??