Form disabledIf - is there no hiddenIf?

Form disabledIf - is there no hiddenIf?

sam marshall
Number of replies: 0
Core developers 사진 Peer reviewers 사진 Plugin developers 사진
I'm trying to convert some old code that used a custom form system, which was much simpler than the current one, but appears to be more powerful in one regard!

In particular, the new form system has disabledIf which is great but it doesn't have a hiddenIf. I want to use it for the following situation:

* Drop-down provides several options [these come from database, not static]
* Each option includes a quantity of text (possibly several paragaphs) describing it. When you choose the relevant option, the text for it appears.

So basically this needs to work in JavaScript... I'm wondering, is there already a way to do this that I have missed?

Otherwise I'm planning to knock up custom JS just for this feature in this form - I probably don't have time to, say, implement hiddenIf. But maybe it should be added as a feature request in the bug tracker, if other people are interested in the idea...

PS I'd also like to see it possible to implement hiddenIf/disabledIf for groups of related controls, by which I don't mean groups, but the fieldset thingies you can make using 'header' elements. But that's easily workaroundable.

--sam
평균 등급 :Useful (1)