Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2008
    Location
    Ireland
    Posts
    40
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Formmail - Required fields problems

    Code:
    <form class="feedback" name="mailing-list" method="post" action="cgi-bin/feedback.pl">
    <img src="images/form-header.png" />
    <textarea cols="" class="doing">Tell us about your experience...</textarea>
    <textarea name="" cols="" rows="" class="email">Your email...</textarea>
    <img src="images/form-bottom.png" />
    <input name="submit" type="submit" class="submit" value="SUBMIT"/>
    <input type="hidden" name="required" value="doing,email">
    <input type="hidden" name="recipient" value="info@company.ie">
    <input type="hidden" name="subject" value="Feedback" />
    <input type="hidden" name="redirect" value="/thanks.html" />
    </form>
    I am using Formmail to send the above form, but even when both fields are filled out, I still get an error message to say they haven't been. This is the second formmail in the CGI bin if that makes any difference.

    Any ideas how to solve this? Thanks

  • #2
    Regular Coder
    Join Date
    Oct 2004
    Posts
    168
    Thanks
    0
    Thanked 5 Times in 5 Posts
    You have left out the name attributes of your form elements.

    Instead of :

    Code:
    <textarea cols="" class="doing">Tell us about your experience...</textarea>
    <textarea name="" cols="" rows="" class="email">Your email...</textarea>
    try this :

    Code:
    <label for="doing">Experience</label>
    <textarea cols="30" rows="5" name="doing">Tell us about your experience...</textarea>
    <label for="email">Email address</label>
    <input type="text" name="email" value="Your email..." />
    The 'class' attribute you were using is for applying StyleSheets, putting them back in will not affect the processing, but not having the 'name' attribute will.
    The email address would be better as a text box rather than a textarea.
    Last edited by Puffin the Erb; 01-22-2010 at 03:44 PM.


  •  

    Posting Permissions

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