Expand my Community achievements bar.

float

Avatar

Level 2

Hi,

here I've got a simple example to flow:

floaten.png

First thing which is strange is that only after clicking "ja" on and off, it flows.

Second thing is that I only tested it here and now I want to do it in a "bigger"/another file. The "big"/another file has the same attitudes as the "small" one:

Page 4: flowed, no data binding and repeat row for each data item

Material: position, normal data binding and no repeat for each data item

Only the hierarchy is a different one:

floaten1.png

but it don’t work. Why?

Thanks in advance for helping me!

Matthias

10 Replies

Avatar

Level 10

Hi Matthias,

Your script looks good and I use the click event with checkboxes, without trouble.

The only suggestion would be to put quotation marks around the 1 in the if statement: if (this.rawValue == "1") and check the on/off values in the checkbox binding tab (on=1 off=0).

Good luck,

Niall

Avatar

Level 2

Hi Niall,

thank you for your help but it doesn't help. Sorry. If you have any other possibilities please let me know them. (I'm not in hurry with this form.)

Matthias

(I want that if "JA" isn't clicked that the "nein" comes directly after "ja")

Avatar

Level 10

Hi Matthias,

Try saving the form as Dynamic and when previewing press Control+J to bring up the JavaScript console to check for errors. You could also include a line to check that the value of Ja is changing when clicked:

console.println("Ja: " + Ja.rawValue);

Your script looks OK, can you share the form?

Niall

Avatar

Level 2

Hi Niall,

thanks for your hints! The form is a dynamic form. Other things (which are similiar like this:

1.Bild.png

flow correctly)

The value of Ja is changing when clicked !

But my problem now is that there is a big gap between the buttons Ja und Nein when the Ja isn't clicked.

2.1.Bild.png2.Bild.png

Could the presence "hidden"/ "invisible" be a reason for it? Should I change it into this one?

Vermutung1.png

Thanks in advance for helping me!

Matthias

Avatar

Level 2

The JavaScript Debugger shows me this after enabling him:

After enable JavaScript Debugger.png

But I have no idea how I got this message that he isn't enabled and how I can do it again to check the other inspects like "Global Variables (this)"...?

Avatar

Level 10

Hi Matthias,

Just on the Javascript Console the message is the standard Acrobat start up messages. Just clear these and by hitting the trash can in the bottom right corner. Then leave the Javascript Console open and click the Ja checkbox multiple times. Does an error come up?

Niall

Avatar

Level 2

Hi Niall,

I can't click the Ja button in the pdf preview.

Matthias

Avatar

Level 10

OK Matthias,

I think I now know what the problem is...

You are correctly using 'hidden' instead of 'invisible' to remove the particular subform from the layout and while parts of your form are set to Flowed, the particular subform containing the checkboxes and the visible/hidden subform is set to Positioned.

Set 'Anreise' (I think) to Flowed, which will allow the 'hidden' script to remove the visible/hidden subform and allow object below to flow up and take the now vacant space.

Hope that works,

Niall

ps Watch out for your script in the 'weitere' button. The parameter in the addInstance(1) is correct. Here the '1' parameter stands for true. However in the removeInstance the parameter tells Acrobat the actual row to be removed on a zero-numbered basis. So your script will always remove the second row in the table. Without seeing the form I can't be sure, but it should look something like this:

_weitere.removeInstance(this.parent.index);

Avatar

Level 10

Hi Matthias,

If you can't interact with the form in Preview, go to the File  > Form Properties and Preview Tab and select 'Interactive Form' from the preview type dropdown:

Parallels Desktop1.png

Niall

Avatar

Level 2

Hi Niall,

oh, that is a lot of work whicht takes time now but I think that this is the right way because I've tested it in a small form. Thank you for your help!!

Have a nice time

Matthias