TOPIC:

addClass If not validated 3 years 8 months ago #181284

  • Topic Author
  • d4shoerncheN
  • Visitor
  • Visitor
Hello,

i have required fields in my forms. Can i add new classes for the input field when validation fails (no matter at Tab or submit)?

Otherwise when the validation is correct (by tab, not by submit) in this input field, they add new class too.

I wish my field would turn red if something wrong or nothing was entered and green by correct input.

Thanks.

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

addClass If not validated 3 years 8 months ago #181333

  • tomeperica's Avatar
  • tomeperica
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 6478
  • Karma: 170
  • Thanks: 667
Hey there,

could you send us your form as Form Package so we can work directly on it, just tell me which field in form you want me to add red and green state?

Follow this steps to create package: crosstec.org/en/support/online-documenta...ted/94-packages.html

Zip it (.zip) and attach here.

Regards,
Tome
Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!

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

addClass If not validated 3 years 8 months ago #181334

  • Topic Author
  • d4shoerncheN
  • Visitor
  • Visitor
Thanks for your help.

All required fields on this form.
Attachments:

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

addClass If not validated 3 years 8 months ago #181389

  • tomeperica's Avatar
  • tomeperica
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 6478
  • Karma: 170
  • Thanks: 667
Pls find attached form below, I have made a color validation on your two fields: zuname & email. Download form, unzip it and install it then test. Code is also under Validaition secion in those 2 elements, so you can have an overview how to create for other fields if needed.

Let us know the result.

Regards,
Tome
Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!
Attachments:

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

addClass If not validated 3 years 8 months ago #181390

  • Topic Author
  • d4shoerncheN
  • Visitor
  • Visitor
Hello Tome,

that looks good. Thanks.

Is it possible to trigger coloring at TAB button too?

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

addClass If not validated 3 years 8 months ago #181407

  • tomeperica's Avatar
  • tomeperica
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 6478
  • Karma: 170
  • Thanks: 667
Hey there,

yes its possible, follwo this steps to do that. Go to you zuname element -> Advanced tab -> Action Script -> Custom -> Check "Blur" and create frameworkm then i case 'blur' put this function ff_validate_form();

Code should look like this:
function ff_zuname_action(element, action)
{
    switch (action) {
        case 'blur':
ff_validate_form();
            break;
        default:;
    } // switch
} // ff_zuname_action

Same thing you can do for your email element.

Test that solution and let us know the result.

Regards,
Tome
Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!

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

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

July Sale!

Discounts for all of our extensions + support. Ending July 31st!

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!