Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#505 2025-12-31 21:04:41
Re: com_connect - form and contact mailer
Bloke wrote #342049:
It should be, as long as you have the latest com_connect.
Thank you, this really helped. I had found only the 4.90 beta before. Steph, thank you loads for your work! Where can i find the donation link?
Last edited by jayrope (2025-12-31 21:21:30)
A hole turned upside down is a dome, when there’s also gravity.
Offline
#506 2025-12-31 21:35:43
Re: com_connect - form and contact mailer
jayrope wrote #342050:
Where can i find the donation link?
Here’s the link to the dev team donations. Thank you so much in advance. And happy new year.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#507 2026-01-01 15:53:13
Re: com_connect - form and contact mailer
Happy New Year everyone!
From the plugins list in the backend pap_comconnect 1.2 links to https://forum.textpattern.io/viewtopic.php?pid=312784#p312784 – a non-existing link, it should be https://forum.textpattern.com/viewtopic.php?pid=312784#p312784 at the least.
Just FYI.
Last edited by jayrope (2026-01-01 15:53:51)
A hole turned upside down is a dome, when there’s also gravity.
Offline
#508 2026-01-01 16:09:59
Re: com_connect - form and contact mailer
@jayrope. ext_com_connect_verify is another mini plugin that you can use to flag ban words patterns. You can customise the comcon_spam_patterns form to block the spam you often get. It usually looks pretty ugly, e.g. (‘ve removed the really offensive words from this)
/[Ff]ore[Mm]edia/
/(Per|Pay)[-\s]Per[-\s]Click/
/(Google|Bing|Facebook)\sAds?/
/[Aa]pp\s[Dd]eveloper/
/(SEO|seo)\s[Ss]pecialist/
/social[-\s]media marketing/
/shopping carts?/
/truly amazing/
/free consultation/
/invermectin/
/[Vv]ideo [Gg]ames/
/[Ww]eb\s?[Dd]esign(er)?/
/[Ww]eb\s?[Dd]evelop(er|ment)/
/Word[Pp]ress/
/reviews/
TXP Builders – finely-crafted code, design and txp
Offline
#509 2026-01-01 16:13:02
Re: com_connect - form and contact mailer
And there’s another even more effective method which swaps out the form action after a time delay, causing automated bots which fill out forms quickly to land in nirvana while allowing regular (slower) people to submit the form.
Use the delay attribute to specify the number of seconds before it switches the form action and the action attribute to specify an alternative (e.g. throwaway) action target, followed by the real one. If it’s the same page as the form, just end the attribute with a comma. Both go in the initial txp:com_connect tag, for example:
delay="5-15" action="https://binit.domain.com/,"
I found that to be most effective so far.
It’s documented here.
TXP Builders – finely-crafted code, design and txp
Offline
#510 2026-01-01 16:25:55
Re: com_connect - form and contact mailer
jakob wrote #342060:
jayrope. "ext_com_connect_verify":./viewtopic.php?pid=306402#p306402 is another mini plugin that you can use to flag ban words patterns. You can customise thecomcon_spam_patterns@ form to block the spam you often get. It usually looks pretty ugly, e.g. (‘ve removed the really offensive words from this)
/[Ff]ore[Mm]edia/...
Thank you, Jakob. I am not versed with patterns, or RegEx for that matter. I did see Bloke’s advice somewhere in this VERY long thread. I suppose it would make sense to combine that info into a help article of sorts, so that the same questions and remarks aren’t asked / made over and over again?
Last edited by jayrope (2026-01-01 16:26:52)
A hole turned upside down is a dome, when there’s also gravity.
Offline
#511 2026-01-01 16:35:07
Re: com_connect - form and contact mailer
jayrope wrote #342062:
Thank you, Jakob. I am not versed with patterns, or RegEx for that matter…
Most of the above is very simple. IIRC a regular term on a blank line also works, so it doesn’t need to be a regex expression. If you wrap the expression with two equal characters, e.g. /…/ then the expression will be processed. The rules above are:
[abc] = one of the contained letters, e.g either a, b, or c
(one|two|three) = one of the contained terms, e.g. either "one", "two", or "three"
\s = One or more spaces, tabs, etc.
? = with or without the preceding item, e.g. \s? = zero or more spaces
(something)? = with or without the preceding group
…and there are many more. regex101.com is a useful site and has a quick reference panel with more options.
TXP Builders – finely-crafted code, design and txp
Offline
#512 Today 11:57:22
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,331
Re: com_connect - form and contact mailer
jakob wrote #342061:
And there’s another even more effective method which swaps out the form action after a time delay, causing automated bots which fill out forms quickly to land in nirvana while allowing regular (slower) people to submit the form.
Use the
delayattribute to specify the number of seconds before it switches the form action and theactionattribute to specify an alternative (e.g. throwaway) action target, followed by the real one. If it’s the same page as the form, just end the attribute with a comma. Both go in the initialtxp:com_connecttag, for example:
delay="5-15" action="https://binit.domain.com/,"...I found that to be most effective so far.
I also asked Claude AI for a good anti-spam solution and he suggested a so-called “honeypot” solution. Sorry if this solution is already integrated into the plugin.
Here’s a honeypot-only solution:
<script>
// Wait 3 seconds before enabling the submit button
setTimeout(function() {
var submitBtn = document.getElementById('submit-btn');
var hpField = document.getElementById('honeypot');
// Enable button only if honeypot is empty
if (submitBtn && hpField && hpField.value === "") {
submitBtn.disabled = false;
submitBtn.style.opacity = "1";
}
}, 3000);
// Additional check: if bot fills the honeypot, lock the button immediately
function checkBot(val) {
var btn = document.getElementById('submit-btn');
if (val !== "") {
btn.disabled = true;
btn.style.opacity = "0.5";
}
}
</script>
<style>
#submit-btn {cursor: pointer;}
#submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.v-hidden { position: absolute; left: -9999px; top: -9999px; visibility: hidden; }
</style>
<txp:com_connect
---
<div class="v-hidden">
<input type="text" name="website" id="honeypot" onchange="checkBot(this.value)" autocomplete="off" tabindex="-1">
</div>
<txp:com_connect_submit label="Send" id="submit-btn" disabled="disabled" />
</txp:com_connect>
This solution uses only a honeypot field (hidden from real users but visible to bots) plus a 3-second delay before enabling the submit button. No reCAPTCHA included.
Last edited by Gallex (Today 12:02:06)
Offline