We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24719
    • 194 Posts
    hi,

    i’ve just been tinkering and wondered why email validation wasn’t working for my form.

    it was because i had the following line:

        <input type="text" name="fromEmail" id="fromEmail" value="[+fromEmail+]" eform="Your email address:email:1:Please enter a valid email address:" />


    when it should have been:

        <input type="text" name="fromEmail" id="fromEmail" value="[+fromEmail+]" eform="Your email address:email:1:Please enter a valid email address" />


    note that in the second correct call, there is no final colon in the eform attribute.

    so, i think we should change around line 197 in eform.inc.php from:

    				}elseif( isset($fld[5]) && $value!="" && $datatype!="file" ) {

    to:
    				}elseif( !empty($fld[5]) && $value!="" && $datatype!="file" ) {


    my first eform attribute caused $fld[5] to be set, but be empty.

    this would solve this little caveat.

    any thoughts?

    great work, thanks
      • 30223
      • 1,010 Posts
      Thanks for pointing that out,.. will be corrected in next version.