Skip to content

Unsetting and resetting the current formset #198

@wilberninsiima

Description

@wilberninsiima

I like the concept of dynamic formsets plugin, I have been using it perfectly but here is a challenge
My formset items are dynamic based on the user's choice. Qty and UnitPrice are set visible by the user (JS), But whenever the user clicks the ADD Line, the default arrangement is appended, Say when previously the qty is checked, still a new dynamic formset comes without the qty field.
Image below

image

Is there any way to reset or destroy the formset on an element such that it recognises the new arrangement based on the user's choice?
Because when I call it multiple times, the more formset items are appended

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions