jquery - From Bootstrap 2.3.2 to Bootstrap 3 how to change control group? -


i in process of upgrading latest bootstrap. use following code lot throughout forms

<form class="form-horizontal">     <div class="control-group">     @html.labelfor(model => model.name, new { @class = "control-label" })     <div class="controls">         @html.editorfor(model => model.name)         @html.validationmessagefor(model => model.name)     </div>    </div>   </form> 

i aware controls has gone in bootstrap 3 , control-group has been replaced form-group.

but once have changed once can see still not same view before. reason bootstrap 3 focusing on mobile first approach. same style need use grid view resize width of inputs.

but cannot figure out how display (where display) error validation message?

what best code replace these forms similar view?

bootstrap 3 introduces grid form layout. need start using col- syntax indiciate how wide label , controls should be. you're going remove controls class completely. here's standard way rework html, keep in mind can have multiple col- classes per element support responsive layout.

 <form class="form-horizontal">     <div class="form-group">     @html.labelfor(model => model.name, new { @class = "control-label col-sm-3" })     <div class="col-sm-9">         @html.editorfor(model => model.name)         @html.validationmessagefor(model => model.name)     </div>    </div>   </form> 

also, inputs expecting have form-control class on them, you'll need update generator that.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -