json-schema-form / angular-schema-form

Generate forms from a JSON schema, with AngularJS!
https://json-schema-form.github.io/angular-schema-form
MIT License
2.47k stars 653 forks source link

Enhancement: Support Input Addons (optional icons for generic inputs : text) #507

Closed warhawk3407 closed 9 years ago

warhawk3407 commented 9 years ago

Hello,

I was surprised that this great micro framework doesn't support bootstrap Input group addons, as described here : http://getbootstrap.com/css/#with-optional-icons

I would be very glad to see an option in the schema in order to add some glyphicon or texts to my inputs, in order to beautify them ! :-p

I think it should be integrated in bootstrap-decorator.

By the way, nice work guys, keep it up ! :+1:

I will implement angular-schema-form in my own project @warhawk3407/bgpanelv2

Best regards

TrevorPage commented 9 years ago

Just to check, the existing options fieldAddonLeft / fieldAddonRight don't achieve what you're referring to, do they...?

warhawk3407 commented 9 years ago

Oups, you are absolutely right @TrevorPage !!

I'm able to do what I want with : fieldAddonLeft: '<span class=\"glyphicon glyphicon-user\">',

Thanks a lot !

This issue can now be closed.

TrevorPage commented 9 years ago

That's excellent. Also, in case it is of any interest, I recently did a modification to the angular-schema-form-dynamic-select library to enable support for fieldAddonLeft / fieldAddonRight on select menus, too. (As standard, you're limited to using it with just text boxes, etc.) It's just a pull request at the moment (https://github.com/OptimalBPM/angular-schema-form-dynamic-select/pull/34) but the same can also be achieved by registering a custom template.