Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Subform, Table, Row - addInstance???

Avatar

19-07-2008

I must be missing something>>>



OK...I've been using Designer (currently ES) for a while to create dynamic forms, I know my way around the interface pretty well. I understand Masterpages and Subforms as well. Until today, I've never had the need to actually script anything...everything that I have done is basic forms with flowable text fields for printing or email.



All I am trying to do is understand the basic concept of how to Add an additional anything (Subform, Table, Row, I don't care). I have reviewed forum posts, tutorials, even read through "Creating Dynamic form in Livecycle Designer" (great book). I seam to do everything correctly...but the ADDING part never works.



Just to make absolutely sure I wasn't doing something or missing something I did the following:



*Started with a completely new form.

*Saved it as a Dynamic XML form

*Renamed the main default subform on the page to 'mainsub'

*Inserted a subform (Subform1) on the page

*Inserted a new table (Table1) with 3 columns and 2 rows (HeaderRow/Row1) inside of Subform1

*Added a button (Button1) outside of Subform1

*Added a JavaScript 'click' to run a 'client' on the button

*The JavaScript is:

form1.mainsub.Button1::click - (JavaScript, client)

Table1.Row1.addInstance(1);

*Set the Default Binding(under the Binding Tab) on Row1 to Normal & Checked "Repeat Row for Each Data Item"

*Changed Subform1 to "Flowed"

*Changed mainsub to "Flowed"



I save the document > Preview or run in Acrobat > No Dice - It's not adding anything?



I really don't care if I Add a Row, Table, or Subform...I just want to figure out what I missed. At this point it is a Quest.



Anyone? Ideas? I'm going Nutz! Thanks in advance.

Replies

Avatar

19-07-2008

Thanks for the attempt! Unfortunately, it doesn't wish to cooperate, no new rows. The JavaScript is now:



form1.main_sub.Button1::click - (JavaScript, client)

Table1.Row1.instanceManager.addInstance(1);



I think I have a broken version of LCD!



In case you're really interested, I posted the stupid file:

http://www.entmill.com/lcd/lc_ai_test.pdf



Thanks again!

Avatar

20-07-2008

Well the only problem was you had to start with the page, and not directly the table-

mainsub.Subform1.Table1.Row1.instanceManager.addInstance(1);



Or, you could just put the button under Subform1, and it would work.

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

21-07-2008

My bet is that you are now viewing it as a dynamic form. If you are doing this through Preview, then on the File/Form Properties/Preview tab make sure that the setting "Preview Adobe XML Form AS:" property is set to Dynamic and the "Preview Type:" is set to interactive.



If you are saving as a PDF then in the save as dialog there is a "Save as Type" dropdown (below the file name) that allows you to choose dynamic xml form.