{"action":"created","issue":{"url":"https://api.github.com/repos/kartik-v/yii2-builder/issues/39","labels_url":"https://api.github.com/repos/kartik-v/yii2-builder/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/kartik-v/yii2-builder/issues/39/comments","events_url":"https://api.github.com/repos/kartik-v/yii2-builder/issues/39/events","html_url":"https://github.com/kartik-v/yii2-builder/issues/39","id":54134210,"number":39,"title":"Multiple inline fields in the same column","user":{"login":"YasserHassan","id":9349772,"avatar_url":"https://avatars.githubusercontent.com/u/9349772?v=3","gravatar_id":"","url":"https://api.github.com/users/YasserHassan","html_url":"https://github.com/YasserHassan","followers_url":"https://api.github.com/users/YasserHassan/followers","following_url":"https://api.github.com/users/YasserHassan/following{/other_user}","gists_url":"https://api.github.com/users/YasserHassan/gists{/gist_id}","starred_url":"https://api.github.com/users/YasserHassan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YasserHassan/subscriptions","organizations_url":"https://api.github.com/users/YasserHassan/orgs","repos_url":"https://api.github.com/users/YasserHassan/repos","events_url":"https://api.github.com/users/YasserHassan/events{/privacy}","received_events_url":"https://api.github.com/users/YasserHassan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kartik-v/yii2-builder/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-13T00:30:23Z","updated_at":"2015-01-18T21:25:25Z","closed_at":"2015-01-13T04:51:46Z","body":"I suggest adding an enhancement to enable the form builder to render multiple inputs in the same column (same DIV) in horizontal and vertical forms. For example, in a 2-column form, we might need to stick a field beside one of the inputs under the same label such as a drop down list for the title (Mr., Mrs., ...etc) beside the first name field, or a time selector stuck to a day selector both with a single label. This could be achieved by defining the attributes like this:\r\n```\r\n...\r\n'attributes' => [\r\n    // username is a normal attribute, rendered as regular input with label in a single column.\r\n    'username' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter username...']],\r\n    [\r\n        // An array, inputs rendered inline in the same column with one label.\r\n        'label' => 'First Name', // Empty string or omitted (vacant label), or false (label DIV removed).\r\n        [\r\n            'attributes' => [ // One or more inputs rendered inline without labels.\r\n                'title' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter title...']],\r\n                'first_name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter first name...']],\r\n            ],\r\n        ],\r\n        // last_name in a single column again.\r\n        'last_name' => ['type' => Form::INPUT_TEXT, 'options' => ['placeholder' => 'Enter last name...']],\r\n    ],\r\n]\r\n...\r\n```"},"comment":{"url":"https://api.github.com/repos/kartik-v/yii2-builder/issues/comments/70426771","html_url":"https://github.com/kartik-v/yii2-builder/issues/39#issuecomment-70426771","issue_url":"https://api.github.com/repos/kartik-v/yii2-builder/issues/39","id":70426771,"user":{"login":"YasserHassan","id":9349772,"avatar_url":"https://avatars.githubusercontent.com/u/9349772?v=3","gravatar_id":"","url":"https://api.github.com/users/YasserHassan","html_url":"https://github.com/YasserHassan","followers_url":"https://api.github.com/users/YasserHassan/followers","following_url":"https://api.github.com/users/YasserHassan/following{/other_user}","gists_url":"https://api.github.com/users/YasserHassan/gists{/gist_id}","starred_url":"https://api.github.com/users/YasserHassan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YasserHassan/subscriptions","organizations_url":"https://api.github.com/users/YasserHassan/orgs","repos_url":"https://api.github.com/users/YasserHassan/repos","events_url":"https://api.github.com/users/YasserHassan/events{/privacy}","received_events_url":"https://api.github.com/users/YasserHassan/received_events","type":"User","site_admin":false},"created_at":"2015-01-18T21:25:25Z","updated_at":"2015-01-18T21:25:25Z","body":"Kartik, please find my feedback below:\r\n- The labels of nested and non-nested attributes have different default CSS classes (\"col-sm-...\" and \"col-md-...\") which makes them switch from horizontal to vertical modes at different widths. This makes the form elements inconsistent at certain widths.\r\n\r\n- At narrow widths, I believe the the complex inputs should remain on the same line below the label instead of rendering them stacked in different lines. This is the main point of inline fields."}}