Just an after-thought...
I have set this up as explained and it looks much cleaner now (
@smooth-graphics - thanks for the walk-through!)
However it has come to my attention that these rules are applied with JavaScript after the page is rendered. This means that while the page is loading, you can see all the fields that I have set to be hidden - the fields only disappear once the page has fully loaded.
Although this is not a huge deal, and I’m happy enough to use this method, I’m wondering whether I could get around this ’bug’ by creating a plugin that hides the fields before the page is properly rendered.
I’ll post in this thread if I manage to sort it out, but if anyone thinks I’d be wasting my time let me know
[EDIT]
Just been looking at the Plugin Events... there is one called "OnResourceTVFormPrerender" which sounds hopeful, but I’m having trouble finding any kind documentation etc about this one :S
It appears that nearly all the Plugin Events have a description on the MODx Documentation website, but this one doesn’t
I may be able to use the OnDocFormPrerender event instead if I can’t figure out exactly when the OnResourceTVFormPrerender event fires.