I am trying to create a button that will duplicate fields that I have displayed as a line item.
For example
Vendor Name ! Contractor Name ! Contractor Role ! Start Date
I would like to have a button under this list which reads "Add another contracotr", which would create a second line.
Vendor Name ! Contractor Name ! Contractor Role ! Start Date
Vendor Name1 ! Contractor Name1 ! Contractor Role1 ! Start Date1
Any help would be greatly appreciated.
Thanks.
P.
Create your fields "VendorName", "ContractorName"... and a button "AddFields" and surround them all with a subform and rename it to "Contractor" for example.
Then put this subform into another subform which is set to floating.
Finally add this JavaScript to the button.
_Contractor.addInstance(1);
With every click there will be added new instance of the subform "Contractor" to the form.
radzmar
• LoveCycle Blog
Documents you need:
• LiveCycle Designer ES2 Docs