Hi Dhiyan,
Thanks for raplying.
Your suggestion does work in the way that id does change the caption of the fields dinamically.
However, looks like when I use the HTML submit button the form still submits the data only in the last fields of the repeated subform and their names have not changed.
Probably when you say that the name of the field is its caption you mean just a static text. But I am refearing to fields where you can enter data inside.
Basically, what I am trying to do, is to be able to dinamically create a table in my acrobat form.
This table has let say 2 fields: InstanceNumber and YearOccured.
So when I lets say add 3 instances in my acrobat form, I want to user to click an HTML submit button, and then through a PHP script I can submit all the 3 instance to a database.
However, when I check the REQUEST array, I only see these 2 fields once (instead of 3 times) and they contain the data of the last added row.
I assume that the problem could be solved if I can somehow change their names while I add rows.
So for example in the first row I will have:
InstanceNumber_1 and YearOccured_1
in the second:
InstanceNumber_2 and YearOccured_2
and in third
InstanceNumber_3 and YearOccured_3
And so when I submit the form it will submit the data of all the rows.
I am not sure if that is possible though. But definatelly I do not know how to do it
))
What I did to go around this is:
I have created 2 other (hidden) fields.
And when I click the submit button, before I do the actuall submit, I take the data from all 3 rows one by one and I put i in this hidded fields as (tab) delimited. And so now I have in my REQUEST array all the data from all 3 rows, in a single tab delimited field. And then I can work it out from there with PHP to submit it where ever.
However, I was hoping for some little more elegant solution, that is if I can change the names and so have all the fields data submitted. Or any other good suggestion
If anyone knows, will buy you a beer
)
Thanks again
Tsvyatko