Forums

Dropdown problem

Marysia 30 Dec, 2015
Hello🙂

I have problem with my form and I hope you can help me.

I have a multifield with dropdowns for Product, Color, Length, Size and Amount.
I have 5 products, for example A, B, C, D and E.
I want Color, Length and Amount to be visible for products A, B and C.
Color and Amount visible for product D.
Size and Amount visible for product E.

At the beginning product A is chosen and options Color, Length and Amount should be visible. For product D Length should get hidden, for product E Length and Color should get hidden, Size should appear.

I have no idea how to build it, as there is too many options for single "=" or "!=" in Events section of the dropdown.
Without product E it would be easy (events --> =D hide parents Length and
!=D show parents Length), but in this situation I get stuck, because if I set in the next line:
=E hide parents Length
I have two opposite commands.

Any suggestions?
GreyHead 30 Dec, 2015
Hi Marysia,

It's probably simplest to use Custom JavaScript to handle the complications here. It will be easier than adding all the possible combinations as ChronoForms events.

Bob
Marysia 01 Jan, 2016
Hi GreyHead,

I'm afraid it sounds too complicated for me, as I barely know Java and I don't know where should I put this custom code and what should it be saying... any suggestions? Maybe in some free moment I will dig deeper into it🙂 for now I use two separate dropdowns.

Thanks for help and Happy New Year🙂
Marysia
GreyHead 03 Jan, 2016
Hi Marysia,

It's JavaScript, not Java and it goes into a Load JavaScript action in the form On Load event.

Bob
Marysia 03 Jan, 2016
Thanks🙂
This topic is locked and no more replies can be posted.