-
Half-wit needs help...with forms...
Alright, I currently have a form that I wrote for the company I work for. The functionality is phenominal, but if a user clicks 'submit' and doesn't have the required fields filled in they are presented with the most grotesque message from web window. I named all the inputs with simple one word names -- like 'first' for First Name, 'last' for Last Name, etc...; With that said, the browser message that is poped up says the name for the field is missing if it is, using the name or ID I called it. I wrote the form with PHP POST as the action. What I need to do is get the form so that when it validates it says -'required field First Name is missing' instead of 'required field first is missing'. ow might I go about doing this, it seems uncomplicated, but evidently I am half mental and have nobusiness programming websites.
Any help is much appreciated, and many thanks ahead of time.
-
-
-
-
It sounds like you need to have some type of form field validation before the field values are passed to PHP.
On a form if 'enter' is pressed the default action is to submit it. This has the effect of bypassing all the fields and you therefore don't have any values in the fields, if they have even been set.
There is a good script for validating that mandatory fields have been completed on this site, this is the link: http://www.dynamicdrive.com/dynamici...uiredcheck.htm
I would also suggest that you use a script that disables the 'enter' key and turns it into a 'tab' action
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks