Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Moving buttons in a subform switch script

Avatar

Level 4

Hi,

I've got a couple of issues with a form I'm making.

1.  It's flowable and when I set the subform to be flowed it moves my buttons around at the beginning -- print, reset, e-mail -- and I can't put spacing between them any more.  How do I correct that?

2.  I have a drop down list that will alter the text in some fields based on the selection.  I can get it switch in the first field, but not later ones.  I don't know if that's because they're in subforms or what?  I had this working yesterday and now it doesn't and I'm not totally sure what I changed.

I tried to put the file on acrobat.com to then put a link in here to it, but it won't let me import it because it's already a pdf.  I do have it downloaded, but when open that it tries to save it back on my computer.  So if there is another wya to show you the file to be helpful that would be good to know.

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Here is the form back to you:

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

You will see I have place the three buttons inside a positioned subform. This allows you to separate the buttons and position them as you want.

The switch statement had an incomplete reference for the last two objects: Subform2.Performance.rawValue and Subform3.PerformanceComments.rawValue.

These showed up in the Javascript Console (Control+J), which you should use to debug your forms. When in preview mode or in Acrobat press Control+J. As you interact with the form any errors should show up here.

Good luck,

Niall

View solution in original post

4 Replies

Avatar

Level 10

Hi,

In Acrobat.com if you select upload, you will be able to upload the pdf form and then select publish in order to copy the link/url to your form. It would be easier to see what is going on with the switch statement if we had the form. Alternatively can you copy your script into the thread.

When dealing with flowed subforms, it is a good idea to place content that does not need to move or grow in size into positioned subforms. One the content that needs to grow should be in flowed subforms. Then the page itself should be set to flowed.

This will allow you to position things like buttons where you want them, because they will be inside positioned subforms.

Hope that helps,

Niall

Avatar

Level 4

I keep trying positioned subforms and that moves things around too.  Here's a link to the file.

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

Avatar

Correct answer by
Level 10

Hi,

Here is the form back to you:

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

You will see I have place the three buttons inside a positioned subform. This allows you to separate the buttons and position them as you want.

The switch statement had an incomplete reference for the last two objects: Subform2.Performance.rawValue and Subform3.PerformanceComments.rawValue.

These showed up in the Javascript Console (Control+J), which you should use to debug your forms. When in preview mode or in Acrobat press Control+J. As you interact with the form any errors should show up here.

Good luck,

Niall

Avatar

Level 4

Thanks so much for the help.  I had tried the scripting with the subform in the switch statement but I must not have

done it correctly.