<div class="card-body" data-bind="if :showParam() || editParameters() ">
<form class="col-lg-12 col-md-12 col-sm-12 form-horizontal" data-bind="submit: submitReportData">
<div id="input-holder" data-bind="foreach:mainData">
<div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
<div style="padding-left:5px;padding-right:5px;" class="form-group row">
<label class="control-label" data-bind="text: DisplayText, attr : {'for' : Name}"></label>
<!-- ko if: DisplayMode() == 'Input' -->
<input style="width:100%" type="text" data-bind="value: Value" class="form-control input-sm">
<!-- /ko -->
<!-- ko if: DisplayMode() == 'Checkbox' -->
<input type="checkbox" data-bind="checked: Value" class="checkbox input-sm">
<!-- /ko -->
<!-- ko if: DisplayMode() == 'Dropdown' && !MultiValue() -->
<select data-bind="options: ParameterOptions, optionsValue: 'value', optionsText: 'label', value: Value, validationElement: Value" class="form-control input-sm"></select>
<!-- /ko -->
<!-- ko if: DisplayMode() == 'Dropdown' && MultiValue() -->
<select data-bind="options: ParameterOptions, optionsValue: 'value', optionsText: 'label', selectedOptions: Value, validationElement: Value" multiple style="height:150px !important;" class="form-control input-sm"></select>
<!-- /ko -->
<!-- ko if: DisplayMode() == 'AutoComplete' -->
<input type="text" data-bind="validationElement: Value, attr : {'id':'autocomplete_' + Name()}" placeholder="@SharedResources.Index.AutocompleteMessage" class="form-control input-sm">
<!-- /ko -->
<!-- ko if: DisplayMode() == 'DatePicker' -->
<input type="text" data-bind="datePicker: Value, attr:{'id': Name() }, validationElement: Value" class="form-control input-sm">
<!-- /ko -->
<!-- ko if: DisplayMode() == 'DateTimePicker' -->
<input type="text" data-bind="dateTimePicker: Value, attr:{'id': Name() }, validationElement: Value" class="form-control input-sm">
<!-- /ko -->
<!-- ko if: DisplayMode() == 'TimePicker' -->
<input type="text" data-bind="timePicker: Value, attr:{'id': Name() }, validationElement: Value" class="form-control input-sm">
<!-- /ko -->
</div>
</div>
</div
I have a grouped element containing various input types like text fields, datepickers, and dropdown lists. These elements are stacked vertically, but I want them to be displayed horizontally. Can I use the 'row' class for each element to achieve this layout?
<div class="card-body" data-bind="if :showParam() || editParameters() ">
<form class="col-lg-12 col-md-12 col-sm-12 form-horizontal" data-bind="submit: submitReportData">
<div id="input-holder" data-bind="foreach:mainData">
<div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
<div style="padding-left:5px;padding-right:5px;" class="form-group row">
<label class="control-label" data-bind="text: DisplayText, attr : {'for' : Name}"></label>
<!-- ko if: DisplayMode() == 'Input' -->
<input style="width:100%" type="text" data-bind="value: Value" class="form-control input-sm">
<!-- /ko -->
<!-- ko if: DisplayMode() == 'Checkbox' -->
<input type="checkbox" data-bind="checked: Value" class="checkbox input-sm">
<!-- /ko -->
<!-- ko if: DisplayMode() == 'Dropdown' && !MultiValue() -->
<select data-bind="options: ParameterOptions, optionsValue: 'value', optionsText: 'label', value: Value, validationElement: Value" class="form-control input-sm"></select>
<!-- /ko -->
<!-- ko if: DisplayMode() == 'Dropdown' && MultiValue() -->
<select data-bind="options: ParameterOptions, optionsValue: 'value', optionsText: 'label', selectedOptions: Value, validationElement: Value" multiple style="height:150px !important;" class="form-control input-sm"></select>
<!-- /ko -->
<!-- ko if: DisplayMode() == 'AutoComplete' -->
<input type="text" data-bind="validationElement: Value, attr : {'id':'autocomplete_' + Name()}" placeholder="@SharedResources.Index.AutocompleteMessage" class="form-control input-sm">
<!-- /ko -->
<!-- ko if: DisplayMode() == 'DatePicker' -->
<input type="text" data-bind="datePicker: Value, attr:{'id': Name() }, validationElement: Value" class="form-control input-sm">
<!-- /ko -->
<!-- ko if: DisplayMode() == 'DateTimePicker' -->
<input type="text" data-bind="dateTimePicker: Value, attr:{'id': Name() }, validationElement: Value" class="form-control input-sm">
<!-- /ko -->
<!-- ko if: DisplayMode() == 'TimePicker' -->
<input type="text" data-bind="timePicker: Value, attr:{'id': Name() }, validationElement: Value" class="form-control input-sm">
<!-- /ko -->
</div>
</div>
</div