Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2013-12-17 12:16:05

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: adi_contact – Form field validation, spam prevention & more

gomedia wrote:

That’ll be something like:

PHP uses PCRE. That’s close, but it will end in error. In different languages where it would work, it will allow anything as long it does not start with ‘0’ and has zero or one “1”.

A working patter would either be, if you just want to disallow based on first character:

/^[^01]/

Or if you want to validate too:

/^(|[2-9+][0-9+\s\-\(\).]+)$/

Which allows empty value or requires that the first character is 2-9 or +, followed by valid numeric phone number consisting of 0-9, +, whitespace (spaces), -, (, ) and ..

Offline

#50 2013-12-17 12:20:31

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_contact – Form field validation, spam prevention & more

Thanks very much!

Offline

#51 2014-08-21 01:59:19

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: adi_contact – Form field validation, spam prevention & more

Hey Adi – I’ve got the following form which is getting absolutely hammered by spammers – so tried to implement your adi_contact_spam method – this is what I have at the moment, but its still not working – am I missing something?:

<txp:zem_contact label="" to="an@email">
<txp:zem_contact_text name="name" label="Name" break="" />
<txp:zem_contact_email name="email" break="" />
<txp:zem_contact_text name="phone" label="Phone" break="" />
<div><txp:zem_contact_textarea name="message" label="Additional Details" break="" /></div>
<txp:zem_contact_submit />
<txp:adi_contact_spam names="name,email,phone,message" />
</txp:zem_contact>

sidenote – I was checking the docs online & your anchor links don’t work at the top

Offline

#52 2014-08-21 03:39:28

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_contact – Form field validation, spam prevention & more

tye wrote #283101:

Hey Adi – I’ve got the following form which is getting absolutely hammered by spammers – so tried to implement your adi_contact_spam method – this is what I have at the moment, but its still not working – am I missing something?:

In principle, that should work … but what form does this spam take? adi_contact_spam will only do its thing if there’re mail headers or urls in the fields.

sidenote – I was checking the docs online & your anchor links don’t work at the top

Yes I know – they work in the plugin help in Admin but you’ve spotted a major lack of functionality online! I think I put it in the “too-hard-basket” all that time ago but perhaps I should have another peek.

Offline

#53 2014-08-21 03:58:14

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: adi_contact – Form field validation, spam prevention & more

They are urls mainly… I don’t really know about mail headers is that cc & bcc fields?

If I post long headers would that help?

Offline

#54 2014-08-23 05:15:01

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: adi_contact – Form field validation, spam prevention & more

What I mean is that I don’t really know if cc & bcc fields are being sent (how do I figure that out??)

Offline

#55 2014-08-23 05:51:22

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_contact – Form field validation, spam prevention & more

tye wrote #283174:

What I mean is that I don’t really know if cc & bcc fields are being sent (how do I figure that out??)

I’ve sent you an email.

Offline

#56 2014-08-25 03:11:31

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: adi_contact – Form field validation, spam prevention & more

Hey Adi – email replied :)

Offline

#57 2014-08-25 06:35:43

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: adi_contact – Form field validation, spam prevention & more

It was working all along!!!

Thanks for taking time to look Adi :)

Offline

#58 2016-06-07 02:35:31

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_contact – Form field validation, spam prevention & more

Take a deep breath … major update time. Version 0.6 is now available.

Here’s what’s on offer:

  • fixed: problem with validate type=“equal” error message
  • enhancement: database update functionality
  • enhancement: MailChimp subscription
  • TXP 4.6 compatibility
  • new tags: adi_contact_headers & adi_contact_body
  • ZCR 4.5+ compatibility: “errorElement” class used in addition to “zemRequirederrorElement”

Note that MailChimp subscription requires zem_contact_reborn v4.5+.

Read more in the top post and in the plugin help.

Much appreciation goes to Bloke for his help with the new ZCR and for demonstrating that MailChimp is not such a scary beast after all.

Offline

#59 2016-07-05 18:54:13

giz
Member
From: New Zealand
Registered: 2004-07-26
Posts: 259
Website

Re: adi_contact – Form field validation, spam prevention & more

Thanks Adi

I’ll give it a go.

Offline

#60 2019-08-22 13:40:49

jeroenvg
Member
From: netherlands
Registered: 2010-04-21
Posts: 34

Re: adi_contact – Form field validation, spam prevention & more

hi!

we’re using adi_contact 0.6, chained with zem_contact_reborn 4.5 on a TXP 4.6 installation to:

  1. save form input to a database table,
  2. subscribe someone to a mailchimp list,
  3. send an e-mail to someone else.

on preliminary testing, we found that steps 2 and 3 don’t work anymore when we upgrade to TXP 4.7.3.

are you planning an update for 4.7 (preferably with zem_contact_reborn replaced by com_connect)?

Offline

Board footer

Powered by FluxBB