Thread tagged as: Problem, Forms

honeypot field: doesn't seem to weed out spam as expected

I wanted to add a honeypot field to a form: I added a hidden honeypot field per the instructions here:

But, I wasn't sure if you needed Akismet for this feature to work, or if it was something that was built into Perch.

I tried testing it by unhiding the field and filling it out before submitting -- but my client still received the form submission via email (I assumed it would prevent submission of the form).

Should she have still gotten the email if the honeypot was working correctly? Is there something else I need to do (i.e., add Akismet as well)?

Incidentally: the forms app is not recognizing this form for some reason, though I have successfully submitted the form.

Chistina Ramey

Chistina Ramey 0 points

  • 5 years ago
Simon Clay

Simon Clay 127 points

Hi, can you post your form template?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Please also post your diagnostics report - thanks.

Here is my form template:

<perch:form id="contact" method="post" app="perch_forms"> <perch:content id="intro" type="textarea" label="Intro" textile="true" editor="markitup" size="m" /> <div> <perch:label for="name">Name</perch:label> <perch:input type="text" id="name" required="true" label="Name" /> <perch:error for="name" type="required">Please add a your name</perch:error> </div> <div> <perch:label for="email">Email address</perch:label> <perch:input type="email" id="email" required="true" label="Email" placeholder="" /> <perch:error for="email" type="required">Please add a your email address</perch:error> <perch:error for="email" type="format">Please check a your email address</perch:error> </div> <div> <perch:label for="class">Choose a class location and time</perch:label> <perch:input type="select" id="class" required="true" label="Choice of class" options="Grace Church: Mon 9:30am, Grace Church: Mon 10:30am,Crown Point Baptist Church: Tue 10:15am, Bay &amp; Bee: Tue 5pm, Casa Marina Hotel: Wed 9am, Casa Marina Hotel: Wed 10am, Celestial Farms: Thu 4pm, Queen's Harbour: Fri 10am, Grace Church: Sat 9:30am" /> <perch:error for="class" type="required"> <span class="error">Please select which class you want to attend.</span> </perch:error> </div> <perch:input type="text" id="subject" antispam="honeypot" /> <div> <perch:label for="message">Questions or comments</perch:label> <perch:input type="textarea" id="message" required="false" label="Message" /> </div> <div> <perch:input type="submit" id="submit" value="Send" /> </div> <perch:success> <perch:content id="success" type="textarea" label="Thank you message" textile="true" editor="markitup" /> <h4>Thank you for signing up for a free class! Check out the <a href="">locations</a> page for directions. We're looking forward to meeting you!</h4> </perch:success> </perch:form>

And here is the diagnostics report:


Perch: 2.8.29 Production mode: Production (100) Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_blog (5.0), perch_events (1.9), perch_forms (1.8.3), perch_gallery (2.5.1) DB driver: PDO DB tables: perch2_blog_authors (2), perch2_blog_categories (0), perch2_blog_comments (43), perch2_blog_index (1362), perch2_blog_posts (5), perch2_blog_posts_to_categories (0), perch2_blog_posts_to_tags (1), perch2_blog_sections (1), perch2_blog_tags (1), perch2_blogs (1), perch2_categories (0), perch2_category_counts (0), perch2_category_sets (1), perch2_content_index (1142), perch2_content_items (274), perch2_content_regions (9), perch2_events (594), perch2_events_categories (0), perch2_events_to_categories (0), perch2_forms (1), perch2_forms_responses (1), perch2_gallery_albums (1), perch2_gallery_image_versions (150), perch2_gallery_images (25), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (1), perch2_pages (5), perch2_resource_log (59), perch2_resource_tags (0), perch2_resources (30), perch2_resources_to_tags (0), perch2_settings (15), perch2_user_passwords (0), perch2_user_privileges (42), perch2_user_role_privileges (15), perch2_user_roles (2), perch2_users (2) Users: 2 App runtimes: <?php include(PERCH_PATH.'/core/apps/content/runtime.php'); include(PERCH_PATH.'/core/apps/categories/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_gallery/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_events/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php'); include(PERCH_PATH.'/addons/apps/perch_forms/runtime.php'); ?> Scheduled tasks for perch_blog: delete_spam_comments (1440 mins) Scheduled tasks for perch_events: update_category_counts (60 mins) Editor plug-ins: markitup H1: 34a771896720528d8c79c72a3f4cfcff L1: 2dda51028d08e5c2e134c3c33aca641a F1: 2edba60ed1f613d6dd804feb202456a2 headerColour: #ffffff content_singlePageEdit: 1 helpURL: siteURL: / hideBranding: 0 content_collapseList: 1 lang: en-gb latest_version: 2.8.15 update_2.6.3: done on_sale_version: 2.8.29 update_2.6.6: done perch_blog_post_url: /blog/post.php?s={postSlug} perch_blog_update: 5.0.1 perch_events_update: 1.8 update_2.8.29: done PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_DB_USERNAME: db173252 PERCH_DB_SERVER: PERCH_DB_DATABASE: db173252_jaxmusic PERCH_DB_PREFIX: perch2_ PERCH_EMAIL_FROM: PERCH_EMAIL_FROM_NAME: Christina Ramey PERCH_LOGINPATH: /perch PERCH_PATH: /nfs/c07/h05/mnt/173252/domains/ PERCH_CORE: /nfs/c07/h05/mnt/173252/domains/ PERCH_RESFILEPATH: /nfs/c07/h05/mnt/173252/domains/ PERCH_RESPATH: /perch/resources PERCH_HTML5: 1 PERCH_RUNWAY: PERCH_ERROR_MODE: DIE PERCH_DATE_LONG: %d %B %Y PERCH_DATE_SHORT: %d %b %Y PERCH_TIME_SHORT: %H:%M PERCH_TIME_LONG: %H:%M:%S PERCH_RUNWAY_ROUTED: PERCH_STRONG_PASSWORDS: PERCH_DEBUG: PERCH_PREVIEW_ARG: preview PERCH_TEMPLATE_PATH: /nfs/c07/h05/mnt/173252/domains/ PERCH_DEFAULT_DOC: index.php PERCH_DEFAULT_EXT: .php PERCH_PRODUCTION_MODE: 100 PERCH_RWD: PERCH_HTML_ENTITIES: PERCH_SSL: PERCH_STRIPSLASHES: PERCH_PROGRESSIVE_FLUSH: 1 PERCH_PARANOID: PERCH_FORCE_SECURE_COOKIES: PERCH_PASSWORD_MIN_LENGTH: 6 PERCH_MAX_FAILED_LOGINS: 10 PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR PERCH_VERIFY_UPLOADS: PERCH_AUTH_PLUGIN: PERCH_DB_CHARSET: utf8 PERCH_DB_PORT: PERCH_DB_SOCKET: PERCH_SESSION_TIMEOUT_MINS: 20 HOSTING SETTINGS

PHP: 5.5.35 Zend: 2.5.0 OS: Linux SAPI: cgi-fcgi Safe mode: not detected MySQL client: 5.5.49 MySQL server: 5.1.67-rel14.3 Free disk space: 9.32 TB Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, fileinfo, filter, ftp, gd, gettext, SPL, iconv, session, intl, json, ldap, mbstring, mcrypt, standard, mysqlnd, mysqli, mysql, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, Reflection, imap, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, mhash GD: Yes ImageMagick: No PHP max upload size: 100M PHP max form post size: 100M PHP memory limit: 196M Total max uploadable file size: 100M Resource folder writeable: Yes Session timeout: 24 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: Yes PATH: /usr/local/bin:/usr/bin:/bin REDIRECT_HANDLER: php-latest REDIRECT_STATUS: 200 UNIQUE_ID: V1ihZ826tBEAADxeJQYAAABm SCRIPT_URL: /perch/core/settings/diagnostics/ SCRIPT_URI: WM_UCONTROL_XMLRPC_SERVER: ACCESS_DOMAIN: DATABASE_SERVER: SITE_ROOT: /home/173252 SITE_CGIROOT: /home/173252/cgi-bin SITE_HTMLROOT: /home/173252/domains/ PHPRC: /home/173252/etc/ HTTP_HOST: HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 HTTP_CONNECTION: keep-alive HTTP_COOKIE: PHPSESSID=98d32d60701d4a3f429927f5ea18ab00; cmsa=1 HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/601.6.17 (KHTML, like Gecko) Version/9.1.1 Safari/601.6.17 HTTP_ACCEPT_LANGUAGE: en-us HTTP_REFERER: HTTP_ACCEPT_ENCODING: gzip, deflate SERVER_SIGNATURE: <address>Apache/2.2.22 Server at Port 80</address> SERVER_SOFTWARE: Apache/2.2.22 SERVER_NAME: SERVER_ADDR: SERVER_PORT: 80 REMOTE_ADDR: DOCUMENT_ROOT: /home/173252/domains/ SERVER_ADMIN: SCRIPT_FILENAME: /home/173252/domains/ REMOTE_PORT: 35712 REDIRECT_QUERY_STRING: extended REDIRECT_URL: /perch/core/settings/diagnostics/index.php GATEWAY_INTERFACE: CGI/1.1 SERVER_PROTOCOL: HTTP/1.1 REQUEST_METHOD: GET QUERY_STRING: extended REQUEST_URI: /perch/core/settings/diagnostics/?extended SCRIPT_NAME: /perch/core/settings/diagnostics/index.php ORIG_SCRIPT_FILENAME: /etc/apache2/gs-bin/php-latest ORIG_PATH_INFO: /perch/core/settings/diagnostics/index.php ORIG_PATH_TRANSLATED: /home/173252/domains/ ORIG_SCRIPT_NAME: /gs-bin/php-latest PHP_SELF: /perch/core/settings/diagnostics/index.php REQUEST_TIME_FLOAT: 1465426279.1975 REQUEST_TIME: 1465426279 argc: 1

Drew McLellan

Drew McLellan 2638 points
Perch Support


You say the Forms app doesn't recognise the form, yet your client is receiving form submissions. Those sound like contradictory statements - could you clarify what you mean here?

I have two forms on my website. And they are both processing submissions. But when I go into the admin backend, and go to the forms app, it only lists one form.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Do the forms have different ids?

No -- they had the same id's! I must have copied and pasted one form as the template for the other, and forgot to change the id's. I corrected the error. Now, the app sees the second form, and looks like it correctly marks forms that have the honeypot filled out as spam, which is great!

One last question -- if it's set up to email the responses somewhere, do you know if it emails the responses marked as spam?

Simon Clay

Simon Clay 127 points

Hi, form entries that are marked as spam aren't emailed.

Hi, looks like you solved your problem. One little thing I'd add is that while the honeypot field does its job well, I found with a client site is that a lot of spam submissions still got through.

Adding Akismet as well has completely solved the issue – a belt and braces approach :)