Good Morning,
Thanks again for your coding yesterday... however, I suspect, due to my limited experience with this stuff, that I failed to describe my need adequately.
Essentially, I need a toggle switch:
If "Yes" fill in field value
If "No" return blank field
What I'm getting right now is:
If "Yes" show field value
If "No" hide field value
However, I need to add up all the field values and because the field value is not cleared, it continues to reflect in the total, hidden or not.
This is what I've got in the Yes Checkbox in the Acrobat Form. (I decided that with a Yes Checkbox, and a No Checkbox, I might be able to pull this off):
var CollectionTotal = this.getField("CollectionTotal")
function product(a,b)
{
return a*b;
}
if (event.target.value == "Yes")
{
CollectionTotal.hidden = false
&& document.write(product("CollectRate*NumPosters"))
}
else {
CollectionTotal.hidden = true
}
However, I am unable to figure out how to set the "No" checkbox to:
1) Hide box AND
2) clear field value...
Alternately, if the single check box could both:
If "Yes" calculate field value and show
If "No" clear field value and hide
That'd be great!
Thanks again, in advance!!
Best,
TrinityAvatar