alleyinteractive / alleyinteractive/wordpress-fieldmanager

Don't submit prototype fields for repeatables

Offen
#625 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
PHP
Sterne
563
Forks
99
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.