{"action":"created","issue":{"url":"https://api.github.com/repos/kristijanhusak/laravel-form-builder/issues/211","labels_url":"https://api.github.com/repos/kristijanhusak/laravel-form-builder/issues/211/labels{/name}","comments_url":"https://api.github.com/repos/kristijanhusak/laravel-form-builder/issues/211/comments","events_url":"https://api.github.com/repos/kristijanhusak/laravel-form-builder/issues/211/events","html_url":"https://github.com/kristijanhusak/laravel-form-builder/issues/211","id":126270475,"number":211,"title":"Multiple Select in subform","user":{"login":"zalazdi","id":603454,"avatar_url":"https://avatars.githubusercontent.com/u/603454?v=3","gravatar_id":"","url":"https://api.github.com/users/zalazdi","html_url":"https://github.com/zalazdi","followers_url":"https://api.github.com/users/zalazdi/followers","following_url":"https://api.github.com/users/zalazdi/following{/other_user}","gists_url":"https://api.github.com/users/zalazdi/gists{/gist_id}","starred_url":"https://api.github.com/users/zalazdi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zalazdi/subscriptions","organizations_url":"https://api.github.com/users/zalazdi/orgs","repos_url":"https://api.github.com/users/zalazdi/repos","events_url":"https://api.github.com/users/zalazdi/events{/privacy}","received_events_url":"https://api.github.com/users/zalazdi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kristijanhusak/laravel-form-builder/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-12T20:39:21Z","updated_at":"2016-01-13T08:21:53Z","closed_at":null,"body":"If i add multiple select ```expanded=false``` it's generate code without ending brackes []. If i set ```expanded=true``` it's works.\r\n\r\n```html\r\n<select class=\"select2_multiple form-control\" multiple=\"1\" id=\"settings[sources]\" name=\"settings[sources]\">\r\n[...]\r\n</select>\r\n```\r\n\r\n```php\r\n<?php\r\n\r\nnamespace App\\Forms;\r\n\r\nuse App\\Entities\\Source;\r\nuse Kris\\LaravelFormBuilder\\Form;\r\n\r\nclass CampaignForm extends Form\r\n{\r\n    public function buildForm()\r\n    {\r\n        $this->add('name', 'text', [\r\n            'label' => 'Nazwa',\r\n            'help_block' => [\r\n                'text' => 'Nazwa kampanii - na użytek wewnętrzny.',\r\n            ],\r\n        ]);\r\n        $this->add('title', 'text', [\r\n            'label' => 'Tytuł',\r\n            'help_block' => [\r\n                'text' => 'Tytuł wiadomości e-mail.',\r\n            ],\r\n        ]);\r\n        $this->add('sender', 'text', [\r\n            'label' => 'Nadawca',\r\n            'help_block' => [\r\n                'text' => 'Nadawca wiadomości. Bez adresu e-mail.',\r\n            ],\r\n        ]);\r\n        $this->add('message', 'textarea', [\r\n            'label' => 'Wiadomość',\r\n            'help_block' => [\r\n                'text' => 'Wiadomość w formacie HTML. Po dodaniu kampanii jest możliwość podglądu wiadomości.',\r\n            ],\r\n        ]);\r\n        $this->add('amount', 'number', [\r\n            'label' => 'Ilość wysyłek',\r\n            'help_block' => [\r\n                'text' => 'Maksymalna liczba wiadomości, jaką może dostać odbiorca z tej kampanii.',\r\n            ],\r\n        ]);\r\n        $this->add('mah', 'text', [\r\n            'label' => 'Podmiot odpowiedzialny',\r\n        ]);\r\n\r\n        $this->add('settings', 'form', [\r\n            'class' => $this->settingsForm(),\r\n            'name' => false,\r\n            'formOptions' => [],\r\n\r\n            'label' => false,\r\n            'wrapper' => false,\r\n        ]);\r\n\r\n        $this->add('submit', 'submit', [\r\n            'label' => ($this->model) ? 'Zapisz' : 'Dodaj',\r\n            'attr' => [\r\n                'class' => 'btn btn-default'\r\n            ],\r\n        ]);\r\n    }\r\n\r\n    public function settingsForm()\r\n    {\r\n        $form = $this->formBuilder->plain();\r\n\r\n        $form->add('sources', 'choice', [\r\n            'label' => 'Źródła',\r\n\r\n            'choices' => Source::all()->pluck('name', 'id')->toArray(),\r\n            'expanded' => false,\r\n            'multiple' => true,\r\n            'attr' => [\r\n                'class' => 'select2_multiple form-control',\r\n            ],\r\n        ]);\r\n\r\n        return $form;\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/kristijanhusak/laravel-form-builder/issues/comments/171213592","html_url":"https://github.com/kristijanhusak/laravel-form-builder/issues/211#issuecomment-171213592","issue_url":"https://api.github.com/repos/kristijanhusak/laravel-form-builder/issues/211","id":171213592,"user":{"login":"kristijanhusak","id":1782860,"avatar_url":"https://avatars.githubusercontent.com/u/1782860?v=3","gravatar_id":"","url":"https://api.github.com/users/kristijanhusak","html_url":"https://github.com/kristijanhusak","followers_url":"https://api.github.com/users/kristijanhusak/followers","following_url":"https://api.github.com/users/kristijanhusak/following{/other_user}","gists_url":"https://api.github.com/users/kristijanhusak/gists{/gist_id}","starred_url":"https://api.github.com/users/kristijanhusak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kristijanhusak/subscriptions","organizations_url":"https://api.github.com/users/kristijanhusak/orgs","repos_url":"https://api.github.com/users/kristijanhusak/repos","events_url":"https://api.github.com/users/kristijanhusak/events{/privacy}","received_events_url":"https://api.github.com/users/kristijanhusak/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T08:21:53Z","updated_at":"2016-01-13T08:21:53Z","body":"Thanks for reporting, i'll check it out."}}