Open Pulkit-Sharma opened 7 years ago
Hi @Pulkit-Sharma
You should pass the function object, not a string (as you've done). So, for example, your code should read:
<script type="text/javascript">
$(function() {
$('#formset tbody tr').formset({
prefix: '{{ new_formset.prefix }}',
deleteText: '<button type="button" class="btn btn-default btn-circle btn-icon" id="formsetbutton">-</i></button>',
addText: '<button type="submit" class="btn btn-default btn-circle btn-icon">+</button>',
removed: recalculate // not 'recalculate()'
});
})
</script>
Sorry for the late response 😄
Thanks for this wonderful plugin. Everything works fine except when I try to pass a function for removed action, it gives below error:
"TypeError: options.removed is not a function"
My function: