I need a way to determine if the form is blank. I have a project and the customer wants one of two scenarios. If the form is 100% blank, no data of any kind in any field, then the want to print it one way. However as soon as a field (any field) has any data in it then it will be printed a different way.
I have tried using event.target.dirty unfortunately any change and the form is marked dirty so this would not work.
My thought is to cycle through all fields and look for a value > null. If I return anything other then null then the form would print as a filled form.
Any help would be greatly appreciated.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Here is a progress tracker form, where the script does two things:
https://acrobat.com/#d=1Evwijur*lEdxMmlWClE7g
As a progress tracker it is not very good, because the function is called from the layoutReady event. This is because as new objects are added, the total counter needs to be updated.
This was adapted from Paul Guerette's LockAllFields example.
You could adapt this just to loop through your form. You would call the function from the click event of the print button, so it would be reasonably efficient, as it would only fire when needed.
Hope that helps,
Niall
Views
Replies
Total Likes
Hi,
Here is a progress tracker form, where the script does two things:
https://acrobat.com/#d=1Evwijur*lEdxMmlWClE7g
As a progress tracker it is not very good, because the function is called from the layoutReady event. This is because as new objects are added, the total counter needs to be updated.
This was adapted from Paul Guerette's LockAllFields example.
You could adapt this just to loop through your form. You would call the function from the click event of the print button, so it would be reasonably efficient, as it would only fire when needed.
Hope that helps,
Niall
Views
Replies
Total Likes
Niall
This is exactly what I need. I am trying to narrow it down though to just the tracking part of the form. I do not need the progress bar on the form. I will sift through and figure out the part I need.
Thanks so much for your help,
Mike
Views
Replies
Total Likes
The function should still do the trick, with some adjustment. When you call the function, don't pass the name of the root node 'form1'. Instead pass the name of the subform for the part of the form that you want checked.
Niall
Views
Replies
Total Likes
I can get the objects to complete to work but for some reason I cannot get the total objects to work.
Views
Replies
Total Likes
I got it to work. Its awesome thank you very much for all your help
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies