Question

Locked

How do I prevent a form submission from reveiving blank values.

By service ·
Im wondering if anyone knows of a way to prevent values coming in blank from a form submission. I'm not referring to validating a form here. I'm just looking for a way to not display blank values that a customer didnt fill out in the form. Example:

I dont want to see -

Organization =
Phone Number =
ect =

I would like to see ONLY the values that a customer filled in. Any suggestions would be very much appreciated. Thank you.

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Javascript..... and yes it is form validation.

by ThumbsUp2 In reply to How do I prevent a form s ...

It's still called form validation even when all you want to do is make sure certain fields are not blank.

I use a script I found somewhere, probably at Javascripts.com or one like it, which checks the form to make sure there is something filled in, anything, just that the field is not blank. The same script, of course, is capable of validating things like dates and email addresses. You don't have to use the parts you don't need. If they try to submit the form, an error box pops up telling them which fields must be filled in or changed. When they click OK on the error box, they are returned to the form to finish. The form will not submit until the required fields are filled.

There are lots of Javascript sites around. User your favorite search engine to locate them. They each usually have search capabilities of their own where you can search for Form Validation....

Collapse -

re:

by service In reply to Javascript..... and yes i ...

Sorry if I wasn't clear - I'm looking for a way so when I receive a form email, I don't get blank values. Any value that is blank I do not want to display in the email. Keep in mind these are optional values and not required. If they were I would agree with implementing validation.

Collapse -

Not possible using just HTML.

by ThumbsUp2 In reply to re:

HTML alone does not have any way to NOT submit empty elements when the submit button is clicked. As long as the fields are optional, null data is treated as a successful control. As long as you're receiving plain text form data, those empty fields will appear.

You would need to use customized programming, such as JavaScript or a 3rd party application, to keep empty fields out of the dataset which is transmitted to you.

I personally use a product called Ultimate Form Mail which does exactly that, plus a lot more if you want to use it, such as database storage of form data and HTML formatted emails containing the data. Ultimate Form Mail parses the data before it is sent to you.

http://www.ultimateformmail.com

Back to Desktop Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums