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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to create a dynamic button?

Jen_Sav
Level 2
Level 2

Hi,

I'm trying to find some information on how to create a button that can be used in a dynamic form within a flowable subform to duplicate that subfom if they need to add more information in that same format.

I've been able to find information on flowable forms and static vs dynamic as well as the concept behind the button but i can't seem to find anywhere instructions on how to actually do it. What scripts to put in in order to get the outcome i'm trying to achieve, all i can find is stuff on the samples and because i can only open the PDF version of the sample and the dynamic version that i can't open i'm unable to see exactly how they've done that sample.

Can anyone help me?????

Any help would be appreciated.

Thank you in advance.

7 Replies
Niall_O_Donovan
Level 10
Level 10

Hi,

Here is an example of buttons that add rows to a table and add (repeat) subforms to a form.

https://acrobat.com/#d=a9ZE9MPvgEVYjsiIwbU47Q

Check out the script in the click events of the buttons.

Also there are some key steps:

  • first make sure your form is saved as dynamic.
  • next you need to set that the subform can be repeated and how many times (eg min., max., and initial). Go to the Object > Binding tab when you have the subform selected.

Parallels Desktop1.png

Hope that helps,

Niall

Jen_Sav
Level 2
Level 2

Hi Niall,

Thank you for that help. It wasn't what i was after because i've tried that sort of stuff using the palettes but it doesn't seem to work. Am i supposed to script it using java script or something like that?

I would like to know exactly how to add a row to a table with a button or add a repeated subform with using a button.

Thanks again.

Niall_O_Donovan
Level 10
Level 10

Hi,

You have to script a button to get this behaviour, typically in the click event. LC Designer has an in-built function called instanceManager. You can use this to addInstance, removeInstance, etc.

If you look at the script in the click events of the buttons you will see the script that adds rows and subforms. They are very similar. The script editor is at the top of the window, if it is only showing one line, you can drag the lower divider, so that you can see several lines at once. If the script editor is closed then you can show it again from the Windows menu.

Parallels Desktop1.png

Hope that helps,

Niall

Jen_Sav
Level 2
Level 2

Hi Niall,

Thanks again for your help. That has helped a little. My next drama is that i cannot figure out at all is to get it to follow onto the next page instead of immediately after the section i want to repeat. Everytime i change the Pagination settings i loose my content on that page that has the section on it. I don't know how to change those settings to make it work. Any clues???

I am so close in getting it right that it's frustrating not being able to find the right setting. The scripting works on the buttons and i've worked that out but just can't seem to get that next step done. With this particular component of LC in creating a form, do you have to make the following fields/subforms to flow aswell so that it can move down the page???

Thanks in advance.

Niall_O_Donovan
Level 10
Level 10

Hi,

You can achieve this, but it involves scripting conditional breaks. Amended sample here: https://acrobat.com/#d=3wCKQE6aFi3hBqw1yimI5Q

If you select the repeating subform you can access the conditional breaks dialog from the Object > Pagination tab:

Parallels Desktop1.png

Click edit and you can input a condition that requires different pagination, like top of next page. This will leave your initial subform at runtime on the first page - all new instances will be on new pages.

Hope that helps,

Niall

Jen_Sav
Level 2
Level 2

Hi Niall,

Thanks for that. I don't know what i'm doing wrong but it just doesn't work for me. Everytime i choose  next page or anything other then Following Previous and Continue fulling parent i loose my whole first page which is where the subform in questions is located and nothing moves to the next page i just loose it alltogether. Is there somehwhere i can send my form for someone to look at it cause it is important that i get this particular funtion correct as i need to use it across our organisation and all forms that i'm creating to be interactive.

Any further help is really appreciated.

Cheers.

Niall_O_Donovan
Level 10
Level 10

Hi,

Send it to me @ ... and I'll try  and get to it tomorrow.

N.