Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: Re: Conditions for a valid email address

  1. #11
    Join Date
    Jul 2008
    Posts
    9

    Default Re: Conditions for a valid email address

    Listen, "stubborn Mr. I know everyething", this is only your opinion. I am not going to argue or fight it over as it is useless. Let me repeat for the last time, "None of junk stuff is getting in via my code" and I am happy with these results. Period.

  2. #12
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Conditions for a valid email address

    Hi,

    You try to help people and get a response like that in return!

    Sorry crabtree.....some of us really appreciate the help you give.

    Den7: you can do whatever you want, but don't mislead new users. I appreciate you trying to help someone, but it's important to be accurate and don't get upset when you're corrected by another user who knows a little more than you.

    Crabtree was right in everything he said.

    The advice he gave was clearly helpful to you as well as the person who started the thread.

    I recommend you carefully re-read what he has said and, even if you don't want to implement changes now, you may benefit later on.
    Last edited by russellr; 20-Nov-2008 at 08:11 AM.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  3. #13
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: Conditions for a valid email address

    hello russ....thx for the support

    i wuz only trying to help with accurate info.

    i dont think theres much mre for me to say on this topic....have i covered evrything?

  4. #14
    Join Date
    Dec 2003
    Posts
    3,980

    Default Re: Conditions for a valid email address

    Hi crabtree,

    have i covered evrything
    Yes, I don't think I could have stated the issues better myself.

    However, I'll summarize for the Original Poster (Psypha)....

    Psypha: crabtree's response is correct. Den7's concept of using JavaScript is OK for normal-user validations, but it won't protect you from bots or users that have JavaScript switched off.

    As crabtree said, use JavaScript for user-friendliness (e.g. immediate response from an error input), but use FormMail's validation features ("required" and "conditions") for proper validation of the submitted form data.

    Some users switch off JavaScript because of perceived (and sometimes real) security threats.

    Most spambots don't run JavaScript at all, so JavaScript validations are useless against them.

    To ensure your FormMail validations don't get bypassed by smart spambots, you can move them into an INI file. It's a little more work, but it's worth doing if you really need the data to be validated properly.

    The HOW TO guide for INI files is here: http://www.tectite.com/fmhowto/inifile.php

    PS, I'm planning to add proper (full) email address validation in a future version of FormMail. So, you won't need those complex conditions for the validating email addresses at some point in the future.
    Russell Robinson - Author of Tectite FormMail and FormMailDecoder
    http://www.tectite.com/

  5. #15
    Join Date
    Jan 2006
    Posts
    35

    Default Re: Conditions for a valid email address

    this appears be what I would like for validation purposes I am just unsure what parts are necessary to put in the .ini file. For instance I would like

    Valid First name;
    Valid Last Name
    Email address:
    Reverify email address:


    If someone could eleborate I would appreciate it very much.

    I started with this:
    Code:
    <form method="post" action="http://capnhud.host22.com/formmail.php" name="SampleForm">
        <input name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER" type="hidden">
        <!-- STEP 2: Put your email address in the 'recipients' value.
                     Note that you also have to allow this email address in the
                     $TARGET_EMAIL setting within formmail.php!
        -->
        <input name="recipients" value="prtaddress" type="hidden">
        <!-- STEP 3: Specify required fields in the 'required' value -->
        <input name="required" value="email:Your email address,realname:Your name" type="hidden">
        <!-- STEP 4: Put your subject line in the 'subject' value. -->
        <input name="subject" value="Sample FormMail Testing" type="hidden">
    		<input type="hidden" name="good_template" value="/forms/samplegoodtemplate.html"/>
        <input type="hidden" name="bad_template" value="/forms/sampleerrortemplate.html"/>
    		<table border="1" cellspacing="5%">
        <tbody><tr>
            <td>
            <p>Please enter First Name:</p>
            </td>
            <td><input name="FirstName" type="text">
            </td>
        </tr>
        <tr>
    			<td>
    			<p>Please enter last name:</P>
    			</td>
    			<td><input name="LastName" type="text">
    			</td>
    		<tr>
            <td>
            <p>Please enter your email address:</p>
            </td>
            <td><input name="EmailAddr" type="text">
            </td>
        </tr>
        <tr>
            <td>
            <p>Re-enter your email address:</p>
            </td>
            <td><input name="Conditions1" type="text">
               </td>
        
        <tr>
            <td valign="top">
            <p>Please enter your message:</p>
            </td>
            <td><textarea name="Mesg" rows="10" cols="50"></textarea>
            </td>
        </tr>
        <tr>
            <td><input value="Submit" type="submit"></td>
            <td></td>
        </tr>
        </tbody></table>
    </form>
    Last edited by Render; 16-Jun-2009 at 12:48 PM. Reason: Provided sample

  6. #16
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: Conditions for a valid email address

    ok, so u have:
    HTML Code:
    <input name="required" value="email:Your email address,realname:Your name" type="hidden">
    but ur fields are named different to this, so u want:
    HTML Code:
    <input name="required" value="EmailAddr:Your email address,
      FirstName:Your first name,
      LastName:Your last name" type="hidden">
    get that working first

    when ur happy its all OK, create an INI file and config formmail:
    http://www.tectite.com/fmhowto/inifile.php

    and move ur required field from the html to the ini file:
    Code:
    [special_fields] 
    required = "EmailAddr:Your email address, FirstName:Your first name, LastName:Your last name"

  7. #17
    Join Date
    Sep 2009
    Posts
    12

    Default Re: Conditions for a valid email address

    Hi all,

    I have a simple question. This condition (code below) works fine but how do I transfer the words "Please, enter a valid e-mail address" to my bad_url's page?

    I set two fields to be required and these two fileds use my bad_url, but then for a next step as far as I understand when it comes for e-mail validation it goes back to my bad_url again and nothing ever happens. Please, advise. Thanks.

    <input type="hidden" name="conditions1" value=":##TEST#emailAdd ~ /^[-a-z0-9_.]+@[-a-z0-9_]+\.([-a-z0-9_.]+)*[a-z0-9_.]$/i #Please, enter a valid email address.#" />

  8. #18
    Join Date
    Sep 2009
    Posts
    12

    Default Re: Conditions for a valid email address

    Quote Originally Posted by Testtor View Post
    Hi all,

    I have a simple question. This condition (code below) works fine but how do I transfer the words "Please, enter a valid e-mail address" to my bad_url's page?

    I set two fields to be required and these two fileds use my bad_url, but then for a next step as far as I understand when it comes for e-mail validation it goes back to my bad_url again and nothing ever happens. Please, advise. Thanks.

    <input type="hidden" name="conditions1" value=":##TEST#emailAdd ~ /^[-a-z0-9_.]+@[-a-z0-9_]+\.([-a-z0-9_.]+)*[a-z0-9_.]$/i #Please, enter a valid email address.#" />
    So nobody knows the answer? The funniest thing is that this code e-mails itself in headers hehe

  9. #19
    Join Date
    Mar 2004
    Posts
    2,224

    Default Re: Conditions for a valid email address

    I have a simple question. This condition (code below) works fine but how do I transfer the words "Please, enter a valid e-mail address" to my bad_url's page?
    formmail and fmbadhandler do that for u

    follow the HOW TO guide

  10. #20
    Join Date
    Sep 2009
    Posts
    12

    Default Re: Conditions for a valid email address

    Hi Crabtree,

    Thank you for your comments. I will take a closer look at your HOW TO. I have a futher then and simplier question I guess. I saw it somewhere either on yur forum or elsewhere saying that your future versions of formmail will have e-mail fields' validation built in. All I would need to do is to insert "required" fileds and if the e-mail fields are in there it will check the proper format of the e-mail addresses entered. Is that true?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Don't want to force entering an email address
    By Goji in forum FormMail Subscription Support
    Replies: 10
    Last Post: 22-Jun-2004, 01:54 AM
  2. no valid recipients were specified.
    By SonSon in forum FormMail Subscription Support
    Replies: 3
    Last Post: 08-Apr-2004, 07:27 AM
  3. yet another no valid receipient
    By koocha in forum FormMail Subscription Support
    Replies: 6
    Last Post: 11-Feb-2004, 10:04 PM
  4. No valid recipients
    By Oktopuz in forum FormMail Subscription Support
    Replies: 2
    Last Post: 06-Feb-2004, 05:48 AM
  5. detect valid email sender
    By richardsb24 in forum FormMail Subscription Support
    Replies: 1
    Last Post: 01-Feb-2004, 04:16 AM

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
  •