We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7455
    • 2,204 Posts
    On a form I made using eForm I get spam, I like to use something like this: #REGEX /^[A-Za-z0-9_]/" to only alow a-z A-Z and numbers and . and , what I want is that if http:// is typed in that it wil refuse this mail or better if www.somename.tld is used that its also not processed.

    Would be better if a badwordlist would just not send the mail when bad words are used
    badwordlist now only replaces the text instead of bringing up an error.

    I tried lots of things but I can not get this to work the right way.

    I hope that someone can help me

    I do not like to use CAPACHA, in case any of you thinks why I do not use that, I think it higher’s the threshold for customers to fill in the form

    Dimmy
      follow me on twitter: @dimmy01
      • 16085
      • 203 Posts
      I’m a bit confused with the REGEX call.

      Ones I’m using but won’t submit. Not sure if I’ve inserted the regex wrong?

      eform="Personal - Postcode:string:1:UK Postcode:#REGEX /(((^[BEGLMNS][1-9]\d?) | (^W[2-9] ) | ( ^( A[BL] | B[ABDHLNRST] | C[ABFHMORTVW] | D[ADEGHLNTY] | E[HNX] | F[KY] | G[LUY] | H[ADGPRSUX] | I[GMPV] | JE | K[ATWY] | L[ADELNSU] | M[EKL] | N[EGNPRW] | O[LX] | P[AEHLOR] | R[GHM] | S[AEGKL-PRSTWY] | T[ADFNQRSW] | UB | W[ADFNRSV] | YO | ZE ) \d\d?) | (^W1[A-HJKSTUW0-9]) | (( (^WC[1-2]) | (^EC[1-4]) | (^SW1) ) [ABEHMNPRVWXY] ) ) (\s*)? ([0-9][ABD-HJLNP-UW-Z]{2})) | (^GIR\s?0AA)/"

      eform="Personal - Mobile:string:0:UK Mobile Number:#REGEX /^07([\d]{3})[(\D\s)]?[\d]{3}[(\D\s)]?[\d]{3}$/"



        • 5340
        • 1,624 Posts
        I would recommend to add a new input field that is hidden with css. If you detect that field has something then it might be a spam.
        I do not know how efficient it is because I do not get spam smiley
          • 16085
          • 203 Posts
          doh! left of the Regex Matching Modes. Seems to be working now.

          Regex Matching Modes - http://www.regular-expressions.info/modifiers.html

          PHP Regex Cheat Sheet - http://php-regex.blogspot.com/