Joomla Form Field items have a useful attribute "showon" which allows you to automatically only display the field if certain other field conditions you specify are met. This can greatly reduce clutter in the form as irrelevant elements remain hidden until they need to be set.
For a simple example you might have enable categories for a component, and also want to set a default category if categories are enabled.
This is all well and good but there is a quirk. showon only works for fields in the same fieldset. Fieldsets are used to group fields together, largely to make it easier to display them all with a single line of code (assuming you are happy with the default layout). But there may be occasions where you want to show a field, or fields, dependent of the setting of a field in another fieldset on the same form.
The problem with that is you'd have to write fresh field types for each type of field you wanted to use - which is a bit of an overhead.
<!-- other fields as required -->
<field name="marker_type" type="list" label="XBMAPS_MRKTYPE_LABEL" description="XBMAPS_MRKTYPE_DESC" onchange="var targ=document.getElementById('jform_params_hidmarker_type');targ.value=value;targ.dispatchEvent(new Event('change'));" > <option value="0">Default</option> <option value="1">Image</option> <option value="2">Awesome</option> </field> </fieldset> </fields>
<fields name="params"> <fieldset name="params" label="JGLOBAL_FIELDSET_DISPLAY_OPTIONS" >
<field name="hidmarker_type" type="hidden" label="XBMAPS_MRKTYPE_LABEL" default="" /> <field name="marker_image" type="imagelist" label="XBMAPS_MRKURL_LABEL" description="XBMAPS_MRKURL_DESC" directory = "" hide_none="true" hide_default="true" showon="hidmarker_type:1" /> <!-- etc -->