{"action":"opened","issue":{"url":"https://api.github.com/repos/sheadawson/silverstripe-dependentdropdownfield/issues/5","labels_url":"https://api.github.com/repos/sheadawson/silverstripe-dependentdropdownfield/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/sheadawson/silverstripe-dependentdropdownfield/issues/5/comments","events_url":"https://api.github.com/repos/sheadawson/silverstripe-dependentdropdownfield/issues/5/events","html_url":"https://github.com/sheadawson/silverstripe-dependentdropdownfield/issues/5","id":55784875,"number":5,"title":"Keeps loading","user":{"login":"hesteric","id":6453793,"avatar_url":"https://avatars.githubusercontent.com/u/6453793?v=3","gravatar_id":"","url":"https://api.github.com/users/hesteric","html_url":"https://github.com/hesteric","followers_url":"https://api.github.com/users/hesteric/followers","following_url":"https://api.github.com/users/hesteric/following{/other_user}","gists_url":"https://api.github.com/users/hesteric/gists{/gist_id}","starred_url":"https://api.github.com/users/hesteric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hesteric/subscriptions","organizations_url":"https://api.github.com/users/hesteric/orgs","repos_url":"https://api.github.com/users/hesteric/repos","events_url":"https://api.github.com/users/hesteric/events{/privacy}","received_events_url":"https://api.github.com/users/hesteric/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-28T17:08:06Z","updated_at":"2015-01-28T17:08:06Z","closed_at":null,"body":"Hi, this is the module I need :)\r\n\r\nBut when I select something in the first dropdown, the depended dropdown shows Loading and futher nothing. This is my code:\r\n\r\n        public function getFields() {\r\n\r\n        $datesSource = function($val){\r\n            if($val == 1){\r\n                array(\r\n                    'NZ' => 'New Zealand',\r\n                    'US' => 'United States',\r\n                    'GEM'=> 'Germany'\r\n                );\r\n            }\r\n            if($val == 2){\r\n                array(\r\n                    'NZ' => 'New Zealand',\r\n                    'US' => 'United States',\r\n                    'GEM'=> 'Germany'\r\n                );\r\n            }\r\n        };\r\n\r\n        $TypeOfProductField = DropdownField::create('TypeOfProduct', 'Type of product', ProductCategory::get()->map('ID', 'Name'))\r\n            ->setEmptyString('(Select one)');\r\n\r\n        $ProductSpecificationField = DependentDropdownField::create('ProductSpecification', 'Product specification', $datesSource)\r\n            ->setDepends($TypeOfProductField);\r\n\r\n        return new FieldList(\r\n            $TypeOfProductField,\r\n            $ProductSpecificationField\r\n        );\r\n\r\n    }\r\n\r\nSee a screenshot in the attachment as well.\r\n![screenshot](https://cloud.githubusercontent.com/assets/6453793/5942541/8902a0f6-a718-11e4-9370-0dfbdcb902ca.jpg)\r\n"}}