Skip to content

Don't submit prototype fields for repeatables #625

@mboynes

Description

@mboynes

Related to #624, large forms can lead to data loss depending on the server configuration. When a group or field is repeatable, Fieldmanager outputs a "prototype" for that repeatable element, then new elements clone it. These hidden "prototype" elements are still part of the form and get submitted with the form.

Fieldmanager should either remove them prior to submission via JS, or (preferably) the prototypes should never be a part of the DOM in the first place. A relatively straightforward solution would be to leverage Underscore templates and change the repeatable functions to use the Underscore templates to build new fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions