Validation Problem with Repeating Groups

Ninpo

Member
This one is a bit complex to explain.

I have a form with 3 groups. One of the groups is set to repeat. Inside of the repeating group I have 3 elements, 2 time fields and a textarea. In a different, non-repeating, group I have an element's ACL set to allow edit only from the creator of the record, so the form edit for that element is set to the nobody group and Use Field is set to the field I am using for UserID. Inside of the repeating group I have some validation rules setup for some of the elements, such as not-empty.

Here is the problem; If one of the elements inside of the repeating group triggers a fail status on the validation, i.e. lets say that the time field is blank, then when the form re-posts that data back after the failed submission, the first textarea, in the repeating group, does not contain the data that was entered, it just says "Array" the subsequent textarea's, in the repeating group are blanked out. If I remove the ACL check in the other element, outside of the repeating group and set it to the public group instead of the nobody group, then when the validation fails, all data in the repeating group is reposted back properly.

I threw the form into a debugger and I noticed some strange behavior in the data structure that is coming back from the model on repost after failed validation. If the other element, outside of the repeating group, ACL is set to the "nobody" group then the repeating group field data is returned like "Array->Array[value1], [value2], [value3], etc....". If the other element ACL is set to the "public" group then the repeating group field data is returned like "Array[value1], [value2], [value3], etc....". So basically if the ACL is set as the nobody group, the data structure embeds an array inside of an array with the actual data contained in the embedded array. If the ACL is set to the public group, then the data structure does not embed a second array inside of the repeating element and it just returns the first array with the data contained within it.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top