Closed sgentile closed 10 years ago
The above html isn't correct - here is the intended result - just not sure how to do this with twitterbootstrapmvc
<div class="form-group">
<div><label for="Member.Gender" class="control-label">Gender</label><span class="required">*</span></div>
<div class="radio-inline">
<label for="Member_Gender_0" class="radio-inline">
<input id="Member_Gender_0" name="Member.Gender" type="radio" value="Male">Male
</label>
<label for="Member_Gender_1" class="radio-inline">
<input id="Member_Gender_1" name="Member.Gender" type="radio" value="Female">Female
</label>
<label for="Member_Gender_2" class="radio-inline">
<input id="Member_Gender_2" name="Member.Gender" type="radio" value="Unknown">Unknown
</label>
</div>
</div>
This produces: https://dl.dropboxusercontent.com/u/6877923/radiolist.png
so is this for RadioButtonListFor()
helper which should produce multiple radio buttons?
I was trying to use the RadioButtonsFromEnumFor helper
have you tried:
@(f.FormGroup().RadioButtonsFromEnumFor(model => model.courseGradeLevels).DisplayInlineBlock())
?
I'm using this:
@(f.FormGroup().CustomControls(Html.Bootstrap().Div(Html.Bootstrap().RadioButtonsFromEnumFor(model => model.Person.Gender).DisplayInlineBlock().Label())))
And it is producing this: https://dl.dropboxusercontent.com/u/6877923/radiolistproblem.PNG
subtle, but the first item 'drops' down - it is using a checkbox-inline - not sure if that matters or not...
I just run that exact code and it looks fine for me. Check if you have conflicting css somewhere on your site. If you think the issue is indeed with BMVC, try to reproduce it in the fresh project and send it to me via email.
was this ever resolved?
sorry been swamped, I haven't tested yet - I'll close and if I reproduce I can open a new item for it
http://getbootstrap.com/css/#forms
I'm having issues getting TwitterBootstrapMvc to work with radio-inline.
The behavior I'm seeing is that it is attaching 'radio' class to the div.
I do believe if it could attach 'radio-inline' on the div and the label it works. Something along the lines of this: