TOPIC:

Check the length of an entry on Begin Submit 4 weeks 14 hours ago #280755

  • Topic Author
  • mmjtech
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 17
  • Thanks: 0
Hi. We've seen an uptick in spam submissions with Breezing Forms lately. Bots have been entering a single digit in the fields to bypass the code I put it place in the Begin Submit section to kick them if there is nothing in a text field.

What can I add to check to see if the submission has less than xx characters in the Begin Submit section?

Thanks,

Brent

Please Log in or Create an account to join the conversation.

Check the length of an entry on Begin Submit 3 weeks 5 days ago #280767

  • Eddy.vh's Avatar
  • Eddy.vh
  • Offline
  • Platinum Member
  • Platinum Member
  • Registered
  • Posts: 791
  • Thanks: 123
Hello and happy new year.

Try this:
$this->execPieceByName('ff_InitLib');

$nbCar = mb_strlen(ff_getSubmit('FieldName'),'utf8'); // FieldName = name of the field to test
if($nbCar <= 2) { // replace 2 with the desired number of characters
                     ff_die('not allowed'); // replace not allowed with your text
                     }

Best regards,
Eddy

Please Log in or Create an account to join the conversation.

Last edit: Post by Eddy.vh.
  • Page:
  • 1
Time to create page: 0.044 seconds

Support Discord

Join our Discord and enter the Crosstec channels for live-support, chat forums and directly interacting with the community!

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Subscribe to news and updates!

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!