Here's the problem:
Consider you have a dropdown:
"Modes of Transportation:
0. [Please Select]
1. CAR
2. BOAT
3. PLANE
You choose CAR and get a new dropdown:
"Make"
0. [Please Select]
1. FORD
2. CHRYSLER
3. JEEP
You choose JEEP and you get your final dropdown:
"Model"
0. [Please Select]
1.CHEROKEE
2...
Here's the problem: If I go this far and then decide to change the first dropdown to PLANE, then it does switch, but the "Make" dropdown will disappear but LEAVE IN PLACE the "Model" dropdown, which is then sitting there with the PLANE options.
The only way to get rid of it is to go back to CAR and select "Please Select" so it disappears, and then switch to PLANE. Obviously that is not desirable.
I'm guessing resolving this is rather simple for someone well familiar with Javascript, however I am not that person.
This module is truly great and if I could resolve this one problem it would be perfect. Any help would be MUCH appreciated.
Thanks.
Chris
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | uc_conditional_attributes-fix-nested-dependencies-1613314-6.patch | 5.68 KB | stewart.adam |
| #3 | uc_conditional_attributes.txt | 6.84 KB | stewart.adam |
Comments
Comment #1
stewart.adam commentedMarked #1580804: Dependant attributing not hiding as a duplicate of this issue.
Comment #2
stewart.adam commentedProbably related to #1425224: Some disable options being shown when not called...
Comment #3
stewart.adam commentedI'm aware that there are a few other logic errors in the js file after having reviewed it, but please give this a try and let me know if it solves your problem.
To install the replacement file simply replace the contents of the uc_conditional_attributes.js file from the module with the contents of the attached file and then clear your browser's cache.
If you download the file as-is, remember to delete the existing uc_conditional_attributes.js file first and then change the file extension on this attachment from .txt to .js.
Comment #4
innovafire commentedI do appreciate you getting back to me, but that patch didn't seem to fix it.
If you want to see the error live, it is here: [removed the link]
In the dropdown, select "Enter my prescription", then scroll down to "Is this a reading prescription?" and choose "Yes", at which point two other dropdowns will show. Now switch the top parent dropdown to "I just want the frames, no lenses" and see how those two dropdowns do not disappear.
Thanks for your time on this,
Chris
Comment #5
innovafire commentedComment #6
stewart.adam commentedThanks for the live demo, that helped troubleshoot the problem. I have written a dependency parser which I think behaves a better and should solve another issue in the queue. I was actually able to test it on your live demo by replacing the old function with the new code on-the-fly in the JavaScript Console and it seems to work well.
I have attached a patch file this time as I prefer using patches for change sets and don't want to clutter the d.o with random JS text files containing lots of duplicate code. If you need help applying the patch there are instructions here (you will need to revert to the original JS file before applying the patch) or alternatively I would be happy to send you updated JS file via email.
Comment #7
innovafire commentedStewart,
Thank you! The patch worked great. Very much appreciated.
Chris
Comment #8
stewart.adam commentedCommitted to dev, release coming soon.
Comment #9.0
(not verified) commentedSlight adjustment made to my original post