www.webdeveloper.com
Results 1 to 3 of 3

Thread: Help with setting up this Formmailer in php.

  1. #1
    Join Date
    Jan 2010
    Posts
    6

    Help with setting up this Formmailer in php.

    I downloaded and configured this php style formmailer.
    http://www.tectite.com/formmailpage.php

    It works perfect and I receive the emails promptly. Only one problem... it still includes the blank form fields in the email. I was wondering if there was a way to set it so blank fields wouldn't be sent. I use to use the formmailer in perl and it wouldn't include blank fields. But for some reason that dosent work anymore... (Some "The specified CGI application misbehaved by not returning a complete set of HTTP headers." error)

    Heres how I have it set up for a basic setting (without the required field)

    Code:
    <form method="post" action="/formmail.php" name="request">
        <input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER">
        <input type="hidden" name="recipients" value="MYEMAIL@gmail.com" />
        <input type="hidden" name="subject" value="CUSTOMER REQUEST" />
        <input type="hidden" name="good_url" value="/thanks.html" />
    Name: <input name="Name" type="text" /><br />
    Customer ID: <input name="Customer ID" type="text" /><br />
    Email Address: <input name="Email" type="text" /><br />
    Comments:<br />
    <textarea name="Comments" rows=5 cols=50></textarea>
    <input type="submit" value="Submit" />
    <input type="reset" value="Clear" />
    </div>
    </form>
    When I send it I get the email including
    "email:
    realname:
    Name:
    Customer_ID:
    Email:
    Comments:"

    I just wish it not to include the blank fields in the email.

  2. #2
    Join Date
    May 2004
    Location
    chennai, tamil nadu, India
    Posts
    445
    http://www.tectite.com/fmdoc/creatin...fbtkj7p4uglsp3

    mailoptions Noempty should solve your problem
    Chris, Senior Developer,
    Php laravel developers,
    www.chrisranjana.com

  3. #3
    Join Date
    Jan 2010
    Posts
    6
    Thanks for the quick reply chrisranjana. I tried setting that value to false and testing my forms and it still sent the empty forms. I even re-downloaded the original script and sample form page from the site and hook the basic stuff up and tested it with the value set to false and it still sent the blank forms.
    Theres gatta be something basic im missing. I'll try to get in contact with the creator.

    EDIT:
    Wow scratch that. Just found my problem. Never added the "<input type="hidden" name="mail_options" value="NoEmpty"/>" tags to the form on the webpage. Works perfect now. Again thanks chrisranjana for the information!
    Last edited by Koning; 01-30-2010 at 01:39 PM.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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



Recent Articles