formio / formio.js

JavaScript powered Forms with JSON Form Builder

Home Page:https://formio.github.io/formio.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Client only fields not removed from submission (component instance.path not calculated correctly)

llaurentiu opened this issue · comments

formojs versions: latest stable (4.18.0) and lower.

Having:

  • an edit grid with an inner container
  • then the inner container has an edit grid inside
  • and we have a client only field in the inner edit grid
  • and we submit/save the form

--> the client only field is not removed from the submission.

Js fiddle: https://jsfiddle.net/fd93k6vr/11/

Technical details:
The cleaning submission code relies on the componentInstance.path property - which for this nesting is not calculated correctly.

See code here
for this type of nesting, the path contains indexes also for the containers (-> container.parentGrid[0].innerContainer[0].editGrid[0].clientOnlyField)

image

We have reproduced this and created a ticket for it.
Ticket for internal tracking: FIO-7779