How to add icon to submit button?
I have a form with
submit = SubmitField('Search')
and a template with
{{ render_field(form.submit) }}
which renders to
<input class="btn btn-primary btn-lg btn-block" id="submit" name="submit" type="submit" value="Search">
but I want the search icon on the submit button instead of the text Search. Anybody know how to do this? Thanks.
This works, but I hope it can be done in a shorter way
<button class="btn btn-primary btn-lg btn-block" id="submit" name="submit" type="submit" value="Search">{{ render_icon('search') }}</button>
If there is no alternative way or supporting this in our implementation, okay I add this to our documentation?
@PanderMusubi It is documented here: https://bootstrap-flask.readthedocs.io/en/stable/macros/#render-icon
Please add support for overriding fill color to it:
https://github.com/helloflask/bootstrap-flask/blob/ed59d2a49220ce46e0171401f755f579c7cababf/flask_bootstrap/templates/base/utils.html#L13-L21