django-bootstrap5 icon indicating copy to clipboard operation
django-bootstrap5 copied to clipboard

addon_before not working

Open GabeSoler opened this issue 10 months ago • 3 comments

Hi, I have been trying to use the addon_before, and is not showing anything. I have been trying to move things around and it does not work. I would like to add an Icon or a word using the

input-group input-group-text

I got that you made it so that is possible, but the 'addon_before' nor 'addon_after' seems to work.

GabeSoler avatar Feb 16 '25 18:02 GabeSoler

Can you provide a reproducible code sample? It is hard to say what is going wrong otherwise. I can definitely say that both addon_before and addon_after are working for me.

xi avatar Sep 03 '25 13:09 xi

Hi, sorry, it was long ago and found a work around.

GabeSoler avatar Sep 03 '25 21:09 GabeSoler

Can you provide a reproducible code sample? It is hard to say what is going wrong otherwise. I can definitely say that both addon_before and addon_after are working for me.

addon_before / addon_after do not work with input[type="color"] because the widget fails is_form_control_widget check

background_color = forms.CharField(
    required=False,
    widget=forms.TextInput(attrs={"type": "color"}),
    label="Background color",
)
{% bootstrap_field form.background_color addon_after="<button>Reset</button>" %}

demoh2019 avatar Dec 08 '25 11:12 demoh2019