TOPIC:

Code is not working 1 month 5 days ago #272779

  • Topic Author
  • Ralle1170
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 18
  • Thanks: 1
Hi,
I am trying to get the following script to work. Have this script here from the forum. How do I change it if the field I want to check is called "Remarks"? Somehow it doesn't work. Can you help? Thanks very much

function ff_badwords(element, message)
{
var urlRegex = /(https?:\/\/)|(www\.)[^\s]+/g;
var badwords = /\b(www|mailto|http|https|php|url|href|link|ftp|sftp|txt)\b/ig;
if (badwords.test(element.value) || urlRegex.test(element.value) || element.value == '') {
if (message=='') message = element.name+" contains a spam word.\n";
ff_validationFocus(element.name);
return message;
} // if
return '';
} // ff_badwords

Regards Ralf

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

Code is not working 1 month 5 days ago #272781

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 10071
  • Karma: 3
  • Thanks: 679
Hi,

it should be like this:
function ff_nameofelement(element, message)
{
var urlRegex = /(https?:\/\/)|(www\.)[^\s]+/g;
var badwords = /\b(www|mailto|http|https|php|url|href|link|ftp|sftp|txt)\b/ig;
if (badwords.test(element.value) || urlRegex.test(element.value) || element.value == '') {
if (message=='') message = element.name+" contains a spam word.\n";
ff_validationFocus(element.name);
return message;
} // if
return '';
} // ff_nameofelement
Please go to element in which you want this->Propertis->Validation->check Custom and put this code.

Please replace nameofelement with name of your element (not title)

And that's it

If you get in stuck let me know and I will help

Regards,
Tihana

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

Code is not working 1 month 5 days ago #272832

  • Topic Author
  • Ralle1170
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 18
  • Thanks: 1
Hi,
Thank you for the fast answer. I have now inserted it, changed it. But nothing is sent if I fill it in normally. There is no message and nothing happens. Even if I enter the spam words, nothing happens.
Maybe you can help again.
Thanks very much

Regards Ralf
Attachments:

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

Code is not working 1 month 5 days ago #272834

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 10071
  • Karma: 3
  • Thanks: 679
Hi,

the code looks ok, but can I test it directly in your page?

If yes, please send me login info and backend link.

Use this tag:
[confidential]
[/confidential]
Please write name of form too

Regards,
Tihana

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

Code is not working 1 month 5 days ago #272839

  • Topic Author
  • Ralle1170
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 18
  • Thanks: 1
here is the login

This message contains confidential information

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

Code is not working 1 month 5 days ago #272842

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 10071
  • Karma: 3
  • Thanks: 679
Hi,

please test it now

Regards,
Tihana

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

Time to create page: 0.049 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

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

Special Offer

Summer 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!