Results 1 to 4 of 4

Thread: Required field not behaving correctly

  1. #1
    Join Date
    Jan 2009
    Posts
    2

    Default Required field not behaving correctly

    Hi All
    I have a contact form that works fine and uses realname and email as required fields BUT when the form displays, only the email field is highlighted in yellow and only the email field returns an error when the required fields are not filled in.

    Also the results that are sent to me show email and realname not the names I have specified.

    Any ideas why it works for one and not the other both are setup on the form identically.

    Using Formmail 8.11

    Code used is below

    <input name="required" type="hidden" id="required" value="email:enquirers email address,realname:enquirers name">

    Many thanks for any advice

  2. #2
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Required field not behaving correctly

    Hi,

    You'll have to post your form code or provide a link to the form to see what's going on.

    ginger

  3. #3
    Join Date
    Jan 2009
    Posts
    2

    Default Re: Required field not behaving correctly

    code as requested

    <form action="formmail.php" method="post" enctype="application/x-www-form-urlencoded" name="contact" id="contact" onSubmit="MM_validateForm('name','','R','email','','RisEmail');return document.MM_returnValue">
    <p align="left"><font color="#666666" size="5" face="Arial, Helvetica, sans-serif">If
    you wish to contact me, please fill in the form</font></p>
    <p align="left"><font color="#666666" size="2" face="Arial, Helvetica, sans-serif">(You
    can contact the <a href="mailto:rjw173@aol.com">webmaster</a> here)</font></p>
    <p> &nbsp;<span style='display:none;mso-hide:all'>
    <INPUT TYPE="hidden" NAME="env_report" VALUE="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER">
    <span
    style='mso-spacerun:yes'>
    <input name="required" type="hidden" id="required" value="email:enquirers email address,realname:enquirers name">
    <input name="subject" type="hidden" id="subject" value="Enquiry from the website contact form">
    </span> <span
    style='mso-spacerun:yes'> </span>
    <INPUT TYPE="hidden" NAME="good_url" VALUE="contact_reply.htm">
    </span> </p>
    <table width="700" border="0" cellspacing="10" cellpadding="0">
    <tr>
    <td width="24%"><font size="4" face="Arial, Helvetica, sans-serif">Insert
    name Here</font></td>
    <td width="69%"><font size="4" face="Arial, Helvetica, sans-serif">
    <input name="realname" type="text" id="realname" maxlength="50">
    </font></td>
    <td width="7%">&nbsp;</td>
    </tr>
    <tr>
    <td><font size="4" face="Arial, Helvetica, sans-serif">Insert E-Mail here</font></td>
    <td><font size="4" face="Arial, Helvetica, sans-serif">
    <input name="email" type="text" id="email" maxlength="50">
    </font></td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td><font size="4" face="Arial, Helvetica, sans-serif">Insert Postal Address</font></td>
    <td><font size="4" face="Arial, Helvetica, sans-serif">
    <textarea name="Address" cols="40" rows="4" id="Address"></textarea>
    </font></td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td><font size="4" face="Arial, Helvetica, sans-serif">What do you want
    to do</font></td>
    <td><font size="4" face="Arial, Helvetica, sans-serif">
    <select name="wants to" id="wants to">
    <option>Ask a question</option>
    <option>Make a comment</option>
    <option selected>Make an Enquiry</option>
    <option>Make a Booking</option>
    <option>Ask for a quotation</option>
    <option>Other</option>
    </select>
    </font></td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td><font size="4" face="Arial, Helvetica, sans-serif">Provide your additional
    information/request here</font></td>
    <td><font size="4" face="Arial, Helvetica, sans-serif">
    <textarea name="info" cols="70" rows="4" id="info"></textarea>
    </font></td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td><font size="4" face="Arial, Helvetica, sans-serif">Do you want me to
    reply?</font></td>
    <td><font size="4" face="Arial, Helvetica, sans-serif">
    <input type="radio" name="reply" value="By Post">
    By Post
    <input type="radio" name="reply" value="By E-Mail">
    By E-Mail</font></td>
    <td>&nbsp;</td>

  4. #4
    Join Date
    May 2008
    Posts
    1,291

    Default Re: Required field not behaving correctly

    I'm not completely following the problem.

    When you say only email returns an error when not filled in, are you talking about the formmail validation or your javascript validation? The yellow highlight that you're talking must be something you've specified with your javascript validation. It has nothing to do with formmail.

    Your field for name is named "realname" and the field for email is named "email", but it looks like you might be referring to a field called "name" in the javascript validation. That's why the javascript isn't displaying an error when "realname" isn't filled in, but it does for "email".

    Formmail should display an error when either realname or email is not filled in.

    ginger

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Required fields containing default text
    By tvulucy in forum FormMail Subscription Support
    Replies: 9
    Last Post: 08-Oct-2004, 09:26 PM
  2. E-mails aren't diplayed correctly
    By vacationrentals in forum FormMail Subscription Support
    Replies: 9
    Last Post: 10-Aug-2004, 07:58 AM
  3. Required Fields not working?
    By zoe77 in forum FormMail Subscription Support
    Replies: 2
    Last Post: 02-Jun-2004, 04:27 PM
  4. required field error
    By Ibis in forum FormMail Subscription Support
    Replies: 18
    Last Post: 02-Mar-2004, 09:04 AM
  5. required does not work ?!
    By flynst4r in forum FormMail Subscription Support
    Replies: 9
    Last Post: 26-Jan-2004, 09:04 PM

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
  •