TOPIC:

Visibility rules 3 years 6 months ago #218985

  • Topic Author
  • i003814
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
I am filling a form with values from the database. This works well.
Now I want to display / hide some sections based on the values I get.

How can I define a visibility rule that checks "empty" ?

turn off section member6 if id6 isnot ' '
turn off section member6 if id6 isnot ""

Thanks for your help.

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

Visibility rules 3 years 6 months ago #219013

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

The visibility rules that check whether some field is empty are following:
turn off section member6 if id6 isnot ![0-9a-zA-Z]$
turn on section member6 if id6 is ![0-9a-zA-Z]$
That should do the trick. It will will turn on section if you enter any number or letter from a-z and A-Z thats regular expression( regexr.com/ ).

Let me know if that worked for you. If you have more questions feel free to ask.

Regards,

Mihaela

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

Visibility rules 3 days 11 hours ago #261785

  • GalanopD
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 61
  • Thanks: 1
I have tried this but it doesn't seem to work for me. Any alternatives?

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

Visibility rules 3 days 10 hours ago #261788

  • Mirec's Avatar
  • Mirec
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 454
  • Karma: 2
  • Thanks: 19
Hi,

I created one example, how to do it.
Please download->unzip->and install it (BF->Configuration->Package Installer->select this xml file->Install Package).
You can find code in Advanced of field 'Name' in Action Script.

code is:
function ff_name_action(element, action)
{
    switch (action) {
        case 'change':
JQuery(document).ready(function(){

if(element.value ==""){
               return bfToggleFields('off','element','a',bfDeactivateField);
}else{
               return bfToggleFields('on','element','a',bfDeactivateField);

}
});


            break;
        default:;
    } // switch
} // ff_name_action

If you need more help, let me know!
Regards,
Mirko
Attachments:
The following user(s) said Thank You: GalanopD

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

Visibility rules 3 days 7 hours ago #261798

  • GalanopD
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 61
  • Thanks: 1
Thank you Mirko,

It works fine!

Regards

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

Visibility rules 3 days 5 hours ago #261799

  • Mirec's Avatar
  • Mirec
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 454
  • Karma: 2
  • Thanks: 19
Hi,

you're welcome!
If you need more help, let me know! :)
Regards,
Mirko

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

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