2008年7月31日星期四

[fw-mvc] Serializing Zend_Form elements with array notation

Hello,

Since lot of emails were referring to array notation on Zend_Form i have also one more question/problem.

I had couple weeks ago to store a form elements into a database. Form is quite complex, having elements with multi values as:

a multi file upload elements

[file][0]
[file][1]
........


or even a content element with subvalues as

[content][file][0]
[content][file][1]
.......................


What i had to store basically was:
- array notation (basically the "tree" of element values)
- values for each element into array notation
- type for each form element
- other data


I find out a rather simple (than very correct) way to store all those things within a database with keys like that (key1, key2, key3, value, type).

I am wondering if there is anything planned for serializing a Zend_Form (into a database).

Cristian

没有评论: