joomla/joomla-cms — pull request #3127 by chivitli (2014-02-16 22:40:35+00:00)
Title: Adding the "showon" feature to JForm

#Overview

In the Joomla Global Configuration we use showon attribute to show/hide certain fields based on the state of a "parent" field. You can see this for example with the FTP settings where the settings itself only show when "Enable FTP" is set to "Yes". It's also available for Component settings.

This PR takes this feature to the JForm so it can be used in any xml file.

#Testing

You can add a showon attribute to any config field you want to hide. For example in
modules\mod_finder\mod_finder.xml you add to line 94
showon="show_label:1". So it looks like this:
```

JGLOBAL_RIGHT

JGLOBAL_LEFT

MOD_FINDER_CONFIG_OPTION_TOP

MOD_FINDER_CONFIG_OPTION_BOTTOM

```

This will only show the "Label position" setting only if the "Show Label" is set to "Yes" (which has the value 1).