Okay, I give up...searched forums, googled it, and can't find the "I'm assuming easy answer" for this script I need help with:
I have a "DaysNeeded" text field and a "TotalAmount" numeric field on my subform. No matter what a user inputs, the minute they type into the "DaysNeeded" field, the "TotalAmount" field should pop up and display $75.00. This dollar amount needs to appear ONLY when a user enters the "DaysNeeded" field. Otherwise, it's GOT TO stay blank; because for the users not filling this in electronically (print out), I can't have that $75.00 displaying, especially if they don't need it. Make sense?
I'm assuming this is a visible/invisible script, but can't figure out how to make it work. Found everything under the sun in relation to check boxes or radio buttons...but this is different. What does it need to be (validate/mouseEnter/enter, etc.??? Formcalc/java?? I'm lost...)
Thanks to all for your input!
Is anything else affecting the TotalAmount field? Is is used by any other field?
Use the check event on the "DaysNeeded" field. This event is run anytime the user types something into the field
Change Script(JavaScript)
if(xfa.event.newText.length)
TotalAmount.rawValue == "$75.00";
else
TotalAmount.rawValue == "";
I'm assuming that TotalAmount is read only, and a text field with no formatting.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script