TOPIC:

Custom Validation 11 years 3 months ago #68871

  • Topic Author
  • sushil
  • Offline
  • New Member
  • New Member
  • Registered
  • Posts: 2
  • Thanks: 0
hi,


For my form I would like to create a validation for all fields .
How can I do this using validation code box?


thanks

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

Re: Custom Validation 11 years 2 months ago #68936

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Administrator
  • Administrator
  • Super Users
  • Posts: 10544
  • Thanks: 864
Hi,
if you need a custom validation like this, you would choose one of the fields' validation => click "custom" => click "create code framework" and then removing everything between opening { and closing }. Between these brackets you would place your validation code. For example:
if( ff_getElementByName('field1').value == '' || ff_getElementByName('field2').value == '' ) { // add more
   return 'Please enter all fields'+"\n";
}
return '';

Since I don't know what validations you want to execute, I guessed a not-empty validation.

Regards,
Markus

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

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.043 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!