{"action":"created","issue":{"url":"https://api.github.com/repos/oscarotero/form-manager/issues/45","labels_url":"https://api.github.com/repos/oscarotero/form-manager/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/oscarotero/form-manager/issues/45/comments","events_url":"https://api.github.com/repos/oscarotero/form-manager/issues/45/events","html_url":"https://github.com/oscarotero/form-manager/issues/45","id":68809080,"number":45,"title":"How I can clear previous \"select\" options","user":{"login":"eusonlito","id":644551,"avatar_url":"https://avatars.githubusercontent.com/u/644551?v=3","gravatar_id":"","url":"https://api.github.com/users/eusonlito","html_url":"https://github.com/eusonlito","followers_url":"https://api.github.com/users/eusonlito/followers","following_url":"https://api.github.com/users/eusonlito/following{/other_user}","gists_url":"https://api.github.com/users/eusonlito/gists{/gist_id}","starred_url":"https://api.github.com/users/eusonlito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eusonlito/subscriptions","organizations_url":"https://api.github.com/users/eusonlito/orgs","repos_url":"https://api.github.com/users/eusonlito/repos","events_url":"https://api.github.com/users/eusonlito/events{/privacy}","received_events_url":"https://api.github.com/users/eusonlito/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-15T23:27:27Z","updated_at":"2015-04-16T09:41:25Z","closed_at":"2015-04-16T09:41:25Z","body":"I need to clear the current options with new options (differents). How can I do it?\r\n\r\nThere are some `empty` method like jQuery?\r\n\r\nMy example:\r\n\r\n```php\r\n$form['states_id']->options([1 => 'aaaa']);\r\n\r\n... very long process ...\r\n\r\n$form['states_id']->options([2 => 'bbbb']);\r\n```\r\n\r\nAfter last step, $form['status_id'] has first and second assignment, but I need to clear first options without define again or other field redefinitions. Something like:\r\n\r\n```php\r\n$form['states_id']->options([1 => 'aaaa']);\r\n\r\n... very long process ...\r\n\r\n$form['states_id']->empty()->options([2 => 'bbbb']);\r\n```\r\n\r\nThanks :)"},"comment":{"url":"https://api.github.com/repos/oscarotero/form-manager/issues/comments/93693752","html_url":"https://github.com/oscarotero/form-manager/issues/45#issuecomment-93693752","issue_url":"https://api.github.com/repos/oscarotero/form-manager/issues/45","id":93693752,"user":{"login":"oscarotero","id":377873,"avatar_url":"https://avatars.githubusercontent.com/u/377873?v=3","gravatar_id":"","url":"https://api.github.com/users/oscarotero","html_url":"https://github.com/oscarotero","followers_url":"https://api.github.com/users/oscarotero/followers","following_url":"https://api.github.com/users/oscarotero/following{/other_user}","gists_url":"https://api.github.com/users/oscarotero/gists{/gist_id}","starred_url":"https://api.github.com/users/oscarotero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oscarotero/subscriptions","organizations_url":"https://api.github.com/users/oscarotero/orgs","repos_url":"https://api.github.com/users/oscarotero/repos","events_url":"https://api.github.com/users/oscarotero/events{/privacy}","received_events_url":"https://api.github.com/users/oscarotero/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T09:41:25Z","updated_at":"2015-04-16T09:41:25Z","body":"Implemented `clear()` (php doesn't allow to create methods called \"empty\")"}}