{"action":"created","issue":{"url":"https://api.github.com/repos/kristijanhusak/laravel4-form-builder/issues/3","labels_url":"https://api.github.com/repos/kristijanhusak/laravel4-form-builder/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/kristijanhusak/laravel4-form-builder/issues/3/comments","events_url":"https://api.github.com/repos/kristijanhusak/laravel4-form-builder/issues/3/events","html_url":"https://github.com/kristijanhusak/laravel4-form-builder/issues/3","id":60672017,"number":3,"title":"Repeated fields' name in child form different than non-repeated","user":{"login":"bishopb","id":6844145,"avatar_url":"https://avatars.githubusercontent.com/u/6844145?v=3","gravatar_id":"","url":"https://api.github.com/users/bishopb","html_url":"https://github.com/bishopb","followers_url":"https://api.github.com/users/bishopb/followers","following_url":"https://api.github.com/users/bishopb/following{/other_user}","gists_url":"https://api.github.com/users/bishopb/gists{/gist_id}","starred_url":"https://api.github.com/users/bishopb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bishopb/subscriptions","organizations_url":"https://api.github.com/users/bishopb/orgs","repos_url":"https://api.github.com/users/bishopb/repos","events_url":"https://api.github.com/users/bishopb/events{/privacy}","received_events_url":"https://api.github.com/users/bishopb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-11T15:01:51Z","updated_at":"2015-03-12T21:46:21Z","closed_at":null,"body":"Essential example:\r\n```\r\nclass MyForm extends Form {\r\n    public function buildForm() {\r\n        $this->add('foo', 'text');\r\n        $this->add('bar', 'repeated', [ 'type' => 'text', 'first_name' => 'bar', 'second_name' => 'bar_confirm' ]);\r\n   }\r\n}\r\n\r\n$child = new MyForm();\r\n\r\n$parent = Form::create(...);\r\n$parent->add('child', 'form', [ 'class' => $child ]);\r\n```\r\n\r\nThe essential rendered output is:\r\n```\r\n<input class=\"form-control\" id=\"foo\" name=\"parent[foo]\" type=\"text\">    \r\n<input class=\"form-control\" id=\"bar\" name=\"bar\" type=\"text\">    \r\n<input class=\"form-control\" id=\"bar_confirm\" name=\"bar_confirm\" type=\"text\">    \r\n```\r\n\r\nExpecting all inputs to be named in \"parent\" space, ie: `parent[bar]` and `parent[bar_confirm]`."},"comment":{"url":"https://api.github.com/repos/kristijanhusak/laravel4-form-builder/issues/comments/78636062","html_url":"https://github.com/kristijanhusak/laravel4-form-builder/issues/3#issuecomment-78636062","issue_url":"https://api.github.com/repos/kristijanhusak/laravel4-form-builder/issues/3","id":78636062,"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":"2015-03-12T21:46:21Z","updated_at":"2015-03-12T21:46:21Z","body":"Yes that was the first idea to use it for confirmation fields. I'll probably update it as i said, to use passed name as first value, and second one to be passed in options, something like this:\r\n```php\r\n<?php\r\n$this->add('password', 'repeated', [\r\n    'first_options' => [],\r\n    'second_name' => 'password_confirmation' // This would be default\r\n    'second_options' => []\r\n]);\r\n```\r\nWould that work out in your case?"}}