TOPIC:

Hyperlinkeingabe verhindern 1 year 8 months ago #231428

  • Topic Author
  • AnaLisa
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 4
  • Thanks: 0
Hallo zusammen,
ich habe dazu leider nichts gefunden. Meine Frage: Kann man verhindern, dass in ein Textfeld ein Hyperlink eingegeben wird. Seit einiger Zeit erhalten wir Nachrichten, die in den Textfeldern Hyperlinks zu merkwürdigen Seiten enthalten.

VG
AnaLisa

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

Hyperlinkeingabe verhindern 1 year 8 months ago #231435

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 413
Hello,

I hope that we can continue in English since we're a bit low on German speaking staff at the moment.

You can solve this problem by adding Validation to wanted textfields that will check if hyperlink is entered in the form and if it is it will display an error message.

Here are instructions on how to do so.
Navigate to Properties of the textfield element and in The Validation section set Type to Custom.

In the code area below paste the following code:
function ff_fieldname_validation(element, message)
{   var urlRegex = /(https?:\/\/[^\s]+)/g;
    if ( urlRegex.test(element.value) ) {
        if (message=='') message = "A hyperlink was entered! \n"
        ff_validationFocus(element.name);
        return message;
    } // if
    return '';
} // ff_fieldname_validation
NOTE: In the code above replace fieldname with the Name of that textfield element.

Let me know whether you've managed to apply this to your form and whether this works as you wanted.

Regards,

Mihaela
The following user(s) said Thank You: AnaLisa

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

Hyperlinkeingabe verhindern 1 year 8 months ago #231443

  • Topic Author
  • AnaLisa
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 4
  • Thanks: 0
Thank you very much! It works.
Best regards
AnaLisa

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

Hyperlinkeingabe verhindern 1 year 8 months ago #231444

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 413
Hello again,

Great! I'm glad I've helped and that it works as you wanted. :)

Regards,

Mihaela

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

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.047 seconds

Summer Sale!

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!