Closed adamwathan closed 8 years ago
There are several types of input-groups. I think we can focus on the more popular ones first.
I would say they are add-ons on the input text. Add-on can be a button, a text (e.g. $), a glyphicon (fontawesome is what I use), an icon (). I think a distant second would be the button dropdown.
Since add-on is only applicable to text, they must be settings of the text widget like BootForm::text()->prependAddOn() or BootForm::text->appendAddOn(). However the text widget is in your Form project which is not bootstrap aware.
The other option would be putting on the FormGroup but it's make less sense since it is only for FormGroup containing a text input.
I am not very fluent on your 2 libs (BootForm & Form) thus I don't know of all the ways to use it.
What do you think?
Definitely a desirable feature.
I've noticed that the text and password input 'objects' all get wrapped in a GroupWrapper object. Adding the prepend and append Addon methods to this class would be helpful.
Those methods should only allow certain objects to be provided like a button.
BootForm::text('Username', 'username')
->appendAddon(BootForm::button('button', 'Button'));
I would suggest adding these methods to the wrapper.
if i need two buttons ,how can i make it?
<div class="col-lg-offset-2 col-lg-10">
<button class="btn btn-default" type="button">button1</button>
<button class="btn btn-default" type="button">button2</button>
</div>
Yes please. I like using input-groups for my icons. <3
Would be awesome:
Input groups are not supporting buttons yet ?
@ricardovigatti I don't think so yet, would happily look at a PR.
Basic input groups are supported now, no documentation yet unfortunately but tests here: https://github.com/adamwathan/bootforms/blob/master/tests/BasicFormBuilderTest.php#L545-L628
Nice, i'll try to take an extra time here at my job to check the code and maybe add functions to support those input group with buttons. Ty.
Slick :+1:
I dont understand, how I make a inputGroup as @JesseLeite is showing, with help from the "tests"-files!
Thanks for the nice job!
Continuation of this discussion: https://github.com/adamwathan/bootforms/pull/8#issuecomment-38410525