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

Attached file indicator checkbox

Avatar

Avatar
Validate 10
Level 3
Geckoz100
Level 3

Likes

20 likes

Total Posts

143 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
Geckoz100
Level 3

Likes

20 likes

Total Posts

143 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Geckoz100
Level 3

07-12-2015

Hello,

I have been trying to script a checkbox to get checked whenever a file is attached to the PDF, whether by using buttons that perform the function, or if the user uses the paper clip icon in the left-side toolbar.  This is my checkbox:

2015-12-07_13-14-07.jpg

The script in my checkbox is in the layout:ready event:


if (event.target.dataObjects) {


  this.rawValue = "1";


}


else {


  this.rawValue = "0";


}


The problem is, the script doesn't fire until I make a selection on a drop-down somewhere else in the form.  What am I missing?

I have scripts in the Attach Files and Remove Files buttons that check/uncheck the box, but that doesn't help any if the user uses the toolbar.

Any help would be greatly appreciated.

Accepted Solutions (0)

Answers (5)

Answers (5)

Avatar

Avatar
Validate 10
Level 3
Geckoz100
Level 3

Likes

20 likes

Total Posts

143 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
Geckoz100
Level 3

Likes

20 likes

Total Posts

143 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Geckoz100
Level 3

23-12-2015

Good to know, thanks again!

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

22-12-2015

There is no such thing... my best bet would be that you remove the possibility to add attachments using the toolbar, or you create a button to "refresh" the form

Avatar

Avatar
Validate 10
Level 3
Geckoz100
Level 3

Likes

20 likes

Total Posts

143 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
Geckoz100
Level 3

Likes

20 likes

Total Posts

143 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Geckoz100
Level 3

22-12-2015

Thanks for responding.  I'll give that a shot, but I'm not sure it'll address the issue of files being attached using the toolbar in the left-side panel.  Does any type of event get triggered by attaching a file that way?

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,077 posts

Correct Reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

21-12-2015

Hi there,

I'd say you should put the script in the calculate event, and when you add or remove attachments, you call the event xfa.form.execCalculate();

Basically, the layout:ready won't execute unless the layout is modified

I hope this will help!

Avatar

Avatar
Validate 10
Level 3
Geckoz100
Level 3

Likes

20 likes

Total Posts

143 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
Geckoz100
Level 3

Likes

20 likes

Total Posts

143 posts

Correct Reply

3 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Geckoz100
Level 3

21-12-2015

Anyone out there that can help, please.....?