Can this program do calculations? -...

User 187934 Photo


Senior Advisor
20,191 posts
Online Now

See if this looks ok. I thought it worked fine as I couldn't submit if I had a zero entered. You may have had a cached version. I did make a few changes for if the user had entered a value and then changed their mind.
http://ericrohloff.com/coffeecup/ccforu … ost_grand/

Make sure you do a ctrl + f5 before trying it.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 139605 Photo


Registered User
83 posts

Hey Eric,

Sorry for the delay in egtting back to you. Had a client emergency.

First off, totally appreciate your help. You have been really helpful and patient. Thank you!

With regards to your form. Yes, I see yours prevents the use of zero. But for my purposes, the actual form has 400 items, not just 2. Right now, the way it is, if they don't fill in anything in the quantity, then that item is ignored and not displayed in the submitted results or email. I need the same thing to happen if they enter a "zero". Because some people WILL do that. And then when the order fulfillment staff receive the email they will have to sift through all these "zero" products to find actual positive number orders. Does that make sense? :)
User 187934 Photo


Senior Advisor
20,191 posts
Online Now

Test my form. You can't enter a zero so it won't submit if you do. If you enter nothing the item isn't sent so there's no zeros to look through.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 139605 Photo


Registered User
83 posts

Yes, I totally get that. BUT, what I foresee is someone getting confused, entering zeros, seeing the message "must be great than or equal to 1" and then thinking "How do I NOT order this item. I'd like to account for these people, and have it simply ignore zeros if they are entered? Or treat zeros the same as if they field was left blank. ;)
User 187934 Photo


Senior Advisor
20,191 posts
Online Now

You can make the error message say anything you want in the form builder. You'll get an error message if somebody enters a letter instead of a number.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 139605 Photo


Registered User
83 posts

True. So, I would have to change all those fields to number fields though right? There's no way to do it with a text field?
User 187934 Photo


Senior Advisor
20,191 posts
Online Now

You probably can but then your going to have trouble validating the users input. Have you considered a dropdown? What numbers are valid for ordering?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 139605 Photo


Registered User
83 posts

Thanks Eric. Ya, it's not the number field that is the problem, it's the switching from a text field. That's 400 items I need to switch, then I'll need to update 400 lines of code in the javascript. Trying to avoid that if I can. It just seams like there should be some easy way to ignore an item if "0" is entered. Like wouldn't that be a simple "if" or "else if" statement? Or is there something I am missing?
User 139605 Photo


Registered User
83 posts

Sent ya something, ;) check your email.
User 187934 Photo


Senior Advisor
20,191 posts
Online Now

Oh you already built the form? I didn't know you had already completed it. It will work with a text field as long as they only enter a number but I think it really goes against the grain but if it works for ya then leave it.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.