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

Multiple SubmitButtons inside ButtonGroup? #407

Open
profnimrod opened this issue Dec 8, 2015 · 2 comments
Open

Multiple SubmitButtons inside ButtonGroup? #407

profnimrod opened this issue Dec 8, 2015 · 2 comments

Comments

@profnimrod
Copy link

I have a form where I'd like to have 3 grouped SubmitButtons for 'Create', Update' and 'Delete', but ButtonGroup does not seem to support SubmitButtons. Any ideas?

This works:

<div class="btn-group">
    @Html.Bootstrap().SubmitButton().Style(ButtonStyle.Success).Text(null).PrependIcon(new Icon("fa fa-cloud-upload fa-fw")).Text("Create").HtmlAttributes(new { @name = "action", @value = "create" })
    @Html.Bootstrap().SubmitButton().Style(ButtonStyle.Primary).Text(null).PrependIcon(new Icon("fa fa-retweet fa-fw")).Text("Update").HtmlAttributes(new { @name = "action", @value = "update" })
    @Html.Bootstrap().SubmitButton().Style(ButtonStyle.Danger).Text(null).PrependIcon(new Icon("fa fa-trash-o fa-fw")).Text("Delete").HtmlAttributes(new { @name = "action", @value = "delete" })
</div>

But it would be better to be able to used to ButtonGroup functionality.

@DmitryEfimenko
Copy link
Owner

The only difference between a .Button and a .SubmitButton is button's type. You could try using .button and override it's type via .HtmlAttributes

@profnimrod
Copy link
Author

That should work... would be nice not to have to do that tho ;-)

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