+ Reply to Thread
Results 1 to 4 of 4

Thread: Formmail - Required fields problem

  1. #1
    Mole is offline Frontpage User Mole will become famous soon enough
    Join Date
    Nov 2009
    Location
    Galway
    Posts
    19

    Default Formmail - Required fields problem

    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="email here">
    <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. #2
    oeb
    oeb is offline Frontpage User oeb will become famous soon enough
    Join Date
    Jan 2010
    Posts
    1

    Default

    Hi Mole,

    I have never used formmail.pl before, but at a guess it's because you are missing the name attributes from the textarea tags.

    Code:
    <form class="feedback" name="mailing-list" method="post" action="cgi-bin/feedback.pl">
    <img src="images/form-header.png" />
    <textarea cols="" class="doing" name="doing">Tell us about your experience...</textarea>
    <textarea name="" cols="" rows="" class="email" name="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="email here">
    <input type="hidden" name="subject" value="Feedback" />
    <input type="hidden" name="redirect" value="/thanks.html" />
    </form> 

  3. #3
    pablo_d is offline Frontpage User pablo_d will become famous soon enough
    Join Date
    Jan 2010
    Posts
    2

    Default

    I have only used Formail a few times, but hopefully this will shed some light,

    similar to what oeb said, you need to label the fields

    Something along the lines to

    Code:
    <label id="Label1">doing</label><input name="doing" type="text" />
    <label id="Label2">email</label><input name="email" type="text" />
    
    then
    Code:
    <input type="hidden" name="required" value="doing,Email" />
    
    Also you may know already, but, it will look at look better if you include your own error page, so if the fields required are not filled in, it will divert to your error page.

    use this
    Code:
    <input type="hidden" name="missing_fields_redirect" value="url to error page" />
    
    Hope this helps

  4. #4
    Mole is offline Frontpage User Mole will become famous soon enough
    Join Date
    Nov 2009
    Location
    Galway
    Posts
    19

    Default

    Ok. I have this working but, I have a new problem now. I have started a new thread here: NMS Formmail - Would appreciate any help. Thanks

+ Reply to Thread

Similar Threads

  1. Web site required
    By fabcards in forum Marketplace Requests
    Replies: 2
    Last Post: 17-03-2009, 09:20 AM
  2. Web Designer Required
    By dave in forum Marketplace Requests
    Replies: 4
    Last Post: 21-07-2007, 10:24 AM
  3. Need a good formmail script
    By 404 username not found in forum Coding Help
    Replies: 9
    Last Post: 26-03-2007, 11:06 PM
  4. Mentor Required
    By enzo in forum Marketplace Requests
    Replies: 13
    Last Post: 30-01-2007, 11:28 AM
  5. Php Jedi(s) Required
    By blacknight in forum Marketplace Requests
    Replies: 9
    Last Post: 25-01-2007, 08:51 AM

Tags for this Thread

Posting Permissions

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

Search Engine Optimization by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64