Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form field returns $0.00 instead of blank 1

Status
Not open for further replies.

JackieGeek

Technical User
Sep 30, 2011
5
CA
I have an order form set up to calculate the total cost of Quantity*price...it works fine except that when there is no quantity entered it is returning a $0.00 instead of staying blank. How do I get it to stay blank?
 
Depending on how you are doing the calculation, you can achieve this in either the calculation or format scripts.

Try this in the 'Format' script:

if (event.value == 0) {
event.value = ''
}
 
Thank you so much...I have tried every variation that I could find on this but yours worked perfectly!!!
Cheers, Jackie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top