Can I post same name value?

I add item dynamically as blow :

for (i=0; i<3; i++) {
obj = {type: ‘input’, name: ‘ai_emp_idx’, inputWidth: 70};
myForm.addItem(pID, obj, i+1);
}

and also changed as below :
for (i=0; i<3; i++) {
obj = {type: ‘input’, name: ‘ai_emp_idx[]’, inputWidth: 70};
myForm.addItem(pID, obj, i+1);
}

It worked correctly and added 3 input box. I posted form to server but sever couldn’t receive ‘ai_emp_idx’ array and also I couldn’t get the ‘ai_emp_idx’ at client side javascript - only last value returned.
Can I post same name items to server?

Thanks in advance.

Hi

form does not handle array in names, so you can try this:
obj = {type: ‘input’, name: ‘ai_emp_idx[’+i+’]’, inputWidth: 70};