PDA

View Full Version : Field data in a fieldset is not removed, when destroying the fieldset-container



Sighter
22 Apr 2013, 6:55 AM
Hey Guys.

Consider the following Setup. I have a form which consist of many fieldsets of the same type (all fieldsets got the same items).The user is able to dynamically add and remove fieldsets from the forms, which actually works very properly on a graphical level.
Now the Problem is, if getFieldValues() is called or the submit-function is called() all fieldsets which were deleted before, get uploaded or respectively get returned too.

Thx in advance & peace
Sascha

slemmon
23 Apr 2013, 9:35 PM
I've seen someone else mention something similar, but I wasn't able to reproduce the issue. Do you have a simple test-case you could share that demonstrates the issue?

Sighter
24 Apr 2013, 3:36 PM
Thx man for replying. A can share a code bit next week, then i'm going over the code again.

But basicly i just jus the the remove()-method of the parent panel to delete the fieldset, and it gets properly removed from the interface. And then, if i use the submit()-method of the form the data fields form the removed form-panels gets uploaded to.

peace
Sascha

slemmon
25 Apr 2013, 2:24 PM
When you take a peek at your code see if you're using the field container's (whatever that may be) remove method and using remove() with the destroy param passed as true.