Copy link to clipboard
Copied
Hi,
I am creating a form that asks a series of yes and no safety related questions. They are all worded so the operator should be answering yes.
I would like to know if there is a way to create a box at the bottom that would populate once all fields are completed. If all answers are yes the box would change to green and display 'SAFE TO FLY'. If any of the answers are no then the box would change to red and display 'DO NOT FLY'.
Any ideas?? Is this even possible?
Thanks,
Copy link to clipboard
Copied
Yes - It's possible. In your final field calculation script, you can use the field isBoxChecked method to examine the other fields and then set the value of the final field and it's color based on the result.
Documentation for isBoxChecked is here
Copy link to clipboard
Copied
Im using a drop down list though not a radio button for yes and no. I already have them conditionally coloured depending on their answer. Would the isBoxchecked work on a drop down list?
And how would I format it to say if all are 'Yes' then green and display text SAFE TO FLY, else if one is no then red and 'DO NOT FLY'
Copy link to clipboard
Copied
Did you look at the documentation link I sent? It explains what field types isBoxchecked will work with.
Copy link to clipboard
Copied
Yes I did,
"The 0-based index of an individual radio button or check box widget" Of which a drop down list is neither.
Copy link to clipboard
Copied
... and here is some information about using colors in Acrobat's JavaScript: https://acrobatusers.com/tutorials/using-colors-acrobat-javascript
Find more inspiration, events, and resources on the new Adobe Community
Explore Now