{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/3379","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/3379/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/3379/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/3379/events","html_url":"https://github.com/joomla/joomla-cms/pull/3379","id":30314602,"number":3379,"title":"[#33295] Adding the \"showon\" & hiddenLabel feature to JForm","user":{"login":"chivitli","id":2385035,"avatar_url":"https://avatars.githubusercontent.com/u/2385035?v=3","gravatar_id":"","url":"https://api.github.com/users/chivitli","html_url":"https://github.com/chivitli","followers_url":"https://api.github.com/users/chivitli/followers","following_url":"https://api.github.com/users/chivitli/following{/other_user}","gists_url":"https://api.github.com/users/chivitli/gists{/gist_id}","starred_url":"https://api.github.com/users/chivitli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chivitli/subscriptions","organizations_url":"https://api.github.com/users/chivitli/orgs","repos_url":"https://api.github.com/users/chivitli/repos","events_url":"https://api.github.com/users/chivitli/events{/privacy}","received_events_url":"https://api.github.com/users/chivitli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2014-03-27T16:00:48Z","updated_at":"2015-04-10T13:59:34Z","closed_at":"2014-03-28T07:48:18Z","pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/3379","html_url":"https://github.com/joomla/joomla-cms/pull/3379","diff_url":"https://github.com/joomla/joomla-cms/pull/3379.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/3379.patch"},"body":"This is like PR #3127, just in sync with the latest changes, and it also adds support for hidden labels on xml level. Here is the copy of the test instructions/description from the previous PR:\r\n\r\n### Overview\r\n\r\nIn 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.\r\n\r\nThis PR takes this feature to the JForm so it can be used in any xml file.\r\n\r\n### Testing\r\n\r\nYou can add a showon attribute to any config field you want to hide. For example in \r\n modules\\mod_finder\\mod_finder.xml you add to line 94\r\n showon=\"show_label:1\". So it looks like this:\r\n```\r\n\t\t\t\t<field\r\n\t\t\t\t\tname=\"label_pos\"\r\n\t\t\t\t\ttype=\"list\"\r\n\t\t\t\t\tdefault=\"left\"\r\n\t\t\t\t\tshowon=\"show_label:1\"\r\n\t\t\t\t\tlabel=\"MOD_FINDER_FIELDSET_ADVANCED_LABEL_POS_LABEL\"\r\n\t\t\t\t\tdescription=\"MOD_FINDER_FIELDSET_ADVANCED_LABEL_POS_DESCRIPTION\">\r\n\t\t\t\t\t<option\r\n\t\t\t\t\t\tvalue=\"right\">JGLOBAL_RIGHT</option>\r\n\t\t\t\t\t<option\r\n\t\t\t\t\t\tvalue=\"left\">JGLOBAL_LEFT</option>\r\n\t\t\t\t\t<option\r\n\t\t\t\t\t\tvalue=\"top\">MOD_FINDER_CONFIG_OPTION_TOP</option>\r\n\t\t\t\t\t<option\r\n\t\t\t\t\t\tvalue=\"bottom\">MOD_FINDER_CONFIG_OPTION_BOTTOM</option>\r\n\t\t\t\t</field>\r\n```\r\n\r\nThis will only show the \"Label position\" setting only if the \"Show Label\" is set to \"Yes\" (which has the value 1).\r\n\r\nTracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33295&start=0"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/91567656","html_url":"https://github.com/joomla/joomla-cms/pull/3379#issuecomment-91567656","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/3379","id":91567656,"user":{"login":"mbabker","id":368545,"avatar_url":"https://avatars.githubusercontent.com/u/368545?v=3","gravatar_id":"","url":"https://api.github.com/users/mbabker","html_url":"https://github.com/mbabker","followers_url":"https://api.github.com/users/mbabker/followers","following_url":"https://api.github.com/users/mbabker/following{/other_user}","gists_url":"https://api.github.com/users/mbabker/gists{/gist_id}","starred_url":"https://api.github.com/users/mbabker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbabker/subscriptions","organizations_url":"https://api.github.com/users/mbabker/orgs","repos_url":"https://api.github.com/users/mbabker/repos","events_url":"https://api.github.com/users/mbabker/events{/privacy}","received_events_url":"https://api.github.com/users/mbabker/received_events","type":"User","site_admin":false},"created_at":"2015-04-10T13:59:34Z","updated_at":"2015-04-10T13:59:34Z","body":"Milestones didn't start getting used until 3.3.4-ish.  Long after this PR was merged."}}