TOPIC:

contact form exclude wrong names 2 years 7 months ago #249918

  • Topic Author
  • Maddddin82
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 7
  • Thanks: 0
I have the following question:
is it possible to exclude wrong names, e.g. Mickey Mouse, when creating forms? If so, how can this be done? Thank you for your help and best regards Martin

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

contact form exclude wrong names 2 years 7 months ago #249919

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Registered
  • Posts: 12079
  • Thanks: 786
Hi,

you can exclude "Mickey Mouse" from form elements, using validation (if someone enter wrong name error message appears)
If you want this, I can point you in the right direction.

Regards,
Tihana

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

Last edit: Post by tihana.krivic.

contact form exclude wrong names 2 years 7 months ago #249920

  • Topic Author
  • Maddddin82
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 7
  • Thanks: 0
Hi Tihana,

thank you for the info. If you can help me here, it would be great.
Thank you very much and best regards
Martin

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

contact form exclude wrong names 2 years 7 months ago #249921

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Registered
  • Posts: 12079
  • Thanks: 786
Hi,

for example if you want exclude name Mickey Mouse from textfield.
1) go to this textfield->Properties->Validation->check Custom->Create code framework and put this:
function ff_nameoftextfield_validation(element, message)
{
    var wrongname = /\b(Mickey Mouse)\b/ig;
    if (wrongname.test(element.value)) {
        if (message=='') message = element.name+" contains a wrong name.\n";
        ff_validationFocus(element.name);
        return message;
    } // if
    return '';
} // ff_nameoftextfield_validation
Please replace nameoftextfield with name of your textfield (not title).

When someone enter name Mickey Mouse and click on Submit button, then error message will appear

Let me know if you need more help.

Regards,
Tihana

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

contact form exclude wrong names 2 years 7 months ago #249922

  • Topic Author
  • Maddddin82
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 7
  • Thanks: 0
Hi Tihana,

thank you.

Regards Martin

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

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

Support Chat

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

After joining, please enter the Crosstec Area and use the #crosstec-support or #crosstec-general channels.

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!