Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - How do I make a field Mandatory?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How do I make a field Mandatory?

 Post Reply Post Reply
Author
kennywhite View Drop Down
Groupie
Groupie


Joined: 26 February 2009
Location: Indy
Status: Offline
Points: 106
Post Options Post Options   Thanks (0) Thanks(0)   Quote kennywhite Quote  Post ReplyReply Direct Link To This Post Topic: How do I make a field Mandatory?
    Posted: 02 September 2010 at 4:36pm
Hello,

I am working on a website using ASP and MS Access. I need to make some fields mandatory in form, but not in the database. How can I do this?

Thanks in advance!
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 06 September 2010 at 8:37am
You could either use JavaScript which onsubmit checks that the required fields are filled in, however if someone turns off JavaScript then the code to check will not run.

The other way is to check server side when the form is submitted that the form field contains data:-

If Request.Form("formFieldName") = "" Then 
Response.Write("Please fill in all required fields")
Response.End
End If
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.