Advanced Search

Results 1 to 3 of 3

Thread: Half-wit needs help...with forms...

  1. #1
    Join Date
    Jun 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Whats your php code

  3. #3
    Join Date
    Apr 2009
    Location
    Cognac, France
    Posts
    400
    Thanks
    2
    Thanked 57 Times in 57 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •