The sample form you linked to is an XFA form created in LiveCycle Designer. If you want to duplicate the functionality of that form, you could add the fields and hide them, and then show a row when a new one is requested. If you use a hierarchical naming convention, it makes it easier to show/hide a row of fields. For example, if you have a row of field with the names row2.col1, row2.col2, row2, col3, the code to show them would be:
// Dsiplay a row of fields
getField("row2").display = display.visible;
Note that a feature of dynamic XFA forms can be a new page is automatically added to the document when the user requests that fields be added but they cannot fit on the current page, or the content that's lower on the page is automatically pushed down as new fields are added. The sample form you linked to does not behave this way, so you can get away with the approach I mentioned.
thank you for helping.
I thought about the same idea >> to add fields and hide them and then show them one by one upon to user reuest , but I think that will solve just a part of the problem regarding the functionality ,,, while the formatting issue won't be solved ,,, I mean look at the form I linked to ,,, the table borders and final appearance remains the same even after adding a new row.
is it possible to do so if I used AcroForm and hide the fields ?
and how will I get the total of those variable number of rows after user finished adding rows ?
regarding the other thing you mentioned (pushing items down as new rows are added) ,,, I think I can avoid this by adding the table in a separate page ,,, because according to my business requirements ,,, rows that will be added won't exceed 30 maximum.
thank you for your time.