Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input groups in a formgroup. #440

Open
johnwc opened this issue Nov 18, 2016 · 2 comments
Open

Input groups in a formgroup. #440

johnwc opened this issue Nov 18, 2016 · 2 comments

Comments

@johnwc
Copy link

johnwc commented Nov 18, 2016

I need to be able to add a input group, so that I can show a currency symbol before the input field. I have no way of doing that.

This is the call today.

@f.FormGroup().EditorFor(m => m.StartPrice).Label().HelpIcon()

I need something like so...

@f.FormGroup().EditorFor(m => m.StartPrice).AppendInputGroup("$").Label().HelpIcon()

and produce...

<div class="input-group">
  <span class="input-group-addon">$</span>
  <input type="text" class="form-control" aria-label="Amount (to the nearest dollar)">
</div>
@DmitryEfimenko
Copy link
Owner

Why can't you use @TextBoxFor:

@Html.Bootstrap().TextBoxFor(m => m.UserName).Prepend("$").Label().HelpIcon()

@johnwc
Copy link
Author

johnwc commented Nov 21, 2016

I am using a FormGroup first. I need the EditorFor because it utilizes the metadata that is applied to the property, a TextBoxFor does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants