PDA

View Full Version : duplicating fields



drumforhim
25 Oct 2012, 5:21 AM
Hello everyone!
I have a form in which i have build a custom field panel that can duplicate itself so the user may enter several values of this field.it's a textfield by the way
so i have given to that field a name of let's say name="kidsNames[]" so the form knows to send an array of values for this field.
my question is, how can load the values of the form into a store since the store has "fixed" fields and my "kidsNames[]" is an array of values.
i remember when i used jquery and php i would take the post values and loop through the array type of values and do the rest.
but i this case there is a need of loading these values to a store. i tried to put type:'array' but it doens't work. i also tried to put at the name key of fields array in the store, the name of my field kidsNames and i appended [] . fields : [{name: "kindsNames[]" : type : "string"}] but it didn't work too!

mitchellsimoens
27 Oct 2012, 1:08 AM
There are two things here. Are you able to set the value to the fields? Also, there is no 'array' type for a field, you should just leave it to the default 'auto'