Needs review
Project:
Explainfield CCK widget
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
1 Dec 2008 at 18:50 UTC
Updated:
29 Jan 2009 at 21:36 UTC
If you have a fieldgroup which is collapsed by default that contains an explainfield, expanding that fieldgroup will always display the optional explain field regardless of what key is selected.
The problem is that hide() is trying to be used on an element which is already not being displayed. To get around this you can replace uses of .hide() with .css('display', 'none') in places where the form is being first evaluated on $(document).ready and the explain field may be in a collapsed fieldgroup.
Comments
Comment #1
snufkin commentedhmm i never tried in a fieldgroup, i'll see what i can do. I think that the JS part of the module at the moment is rather crude, i'll rewrite it and test with fieldsets. thanks for the hint!
Comment #2
zbricoleur commentedThank you for the elegant solution, cYu, I've been banging my head against this problem all day.