Avatar

Level 10

Hi,

I'll jump in...

There are a few problems with the form:

  • It was saved as a static form, which does not allow dynamic behaviour like adding rows. I have saved it as a Dynamic XML Form in the save as dialog.
  • In order for a form with repeatable objects to work, generally the page should be set up as Flowed. Currently it is positioned, which means that the objects on the page are positioned with x and y coordinates. I changing the untitled page, to "page2" and then before I set it to Flowed, I wrapped static objects in a positioned subform. Otherwise the layout would be shot.
  • Not naming objects (including pages) makes it difficult to script against. Name as you go!
  • The subform that you want to repeat "Customerinfo" needs to be set to repeat in the Object > Binding palette.
  • In the script you did not specify the name of the repeating subform that you want to add new instances. I have added this, see line 16 in your original form. Also there were errors in the object references. Effectively you had repeat script above the auto-generated script, so I deleted the auto-generated script.

I have the "Add more ships to" button working, see if you can get the others going.

Here is the form back to you: https://acrobat.com/#d=Eh*hknpY8vgVHAQSTIpMsw

There is a bit of adjustment in the layout after changing the page to Flowed.

Paul Guerette is giving a free online Tech Talk on dynamic forms and I would recommend it. Details are here: Tech Talk: Developing Flowable Form Content

Hope that helps,

Niall