elo80ka / django-dynamic-formset

A jQuery plugin that allows you dynamically add new forms to a rendered django formset.
677 stars 311 forks source link

Button does not remove when add to deleteCssClass #113

Open wlopz opened 8 years ago

wlopz commented 8 years ago

I added a bootstrap button into deleteCssClass but it is not letting me remove the row after I implement it.

<script>
        $('.chaptermarks-formset').formset({
            addText: 'Add Another Chapter Mark',
            deleteText: 'Delete',
            addCssClass: 'btn btn-info btn-sm',
            deleteCssClass: 'btn btn-info btn-sm'
        });
    </script>

Is there any way around this to make it happen?

Thanks

fproldan commented 7 years ago

Do you have {{ form.DELETE }} in your form?

ghost commented 7 years ago

I'm having the same issue, and i have {{ form.DELETE }}

If i remove deleteCssClass the delete link works flawlessly

Eyap53 commented 6 years ago

Hi, i've got the exact same problem.

It work flawlessly when i remove the "btn" class though, so i'm expecting that it's the button property that create this bug.

Did you find a way to make it work, by any chance ?

bblanchon commented 5 years ago

I had the same problem with version 1.2.2. Upgrading to the latest version fixed the issue.

agirivera commented 5 months ago

Also discovered 1.5-pre removes other inline formsets' delete link/button in this block. The quickest solution I used to add unique classes in each formset's deleteCssClass.