option group visibility condition

  • msantiago
  • msantiago's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0

msantiago created the topic: option group visibility condition

hi,
i'm newbie

i have an option group with 3 options and i need to show and hide sec 1 to option 1; sec2 to option 2 and sec3 to option 3.

how can i do? i tried some examples but i couldn't find solution.


thanks in advance
#187267
Attachments:
  • MarioPuco
  • MarioPuco's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 2096
  • Karma: 53
  • Thank you received: 166

MarioPuco replied the topic: option group visibility condition

Hello,

We achieved this with JavaScript Visibility rules. You can find out more on how to implement Visibility rules in this article : crosstec.org/en/support/online-documenta...s-in-javascript.html

First thing you need to do is format your RADIO group like this :
0;Individual;1
0;Grupo / equipa;0
0;Treinador;2

Then you go to radiogroup advance options > ActionScript > Action : "change" and add this code :

function ff_grpselect_action(element, action)
{
    switch (action) {
   case 'change':
          vals = '';
          opts = JQuery("[name=\"ff_nm_grpselect[]\"]");
          for (o = 0; o < opts.length; o++)
          if (opts[o].checked)
          {
               vals = opts[o].value;
          }
          if (vals=="1") // here you can add further dependencies
          {
                bfToggleFields('on','section','secInd',bfDeactivateField);
          }
          else
          {
                bfToggleFields('off','section','secInd',bfDeactivateField);
          }
		   if (vals=="0") // here you can add further dependencies
          {
                bfToggleFields('on','section','bfQuickModeSection62660',bfDeactivateField);
          }
          else
          {
                bfToggleFields('off','section','bfQuickModeSection62660',bfDeactivateField);
          }
		   if (vals=="2") // here you can add further dependencies
          {
                bfToggleFields('on','section','bfQuickModeSection71243',bfDeactivateField);
          }
          else
          {
                bfToggleFields('off','section','bfQuickModeSection71243',bfDeactivateField);
          }
          break;
          default:;
    } // switch
} // ff_grpselect_action

I have attached the form with these rules implemented so you can see how it's done.
If you find yourself stuck with this just let us know.

Regards,
Mario

===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
#187354
Attachments:
  • msantiago
  • msantiago's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0

msantiago replied the topic: option group visibility condition

it doesn't work, i think that because my joomla is 1.5 and i'm using BreezingForms 1.7.5 Stable. but i downloaded last lite version and didn't work. how can i have version 1.8.4 to download?

thanks in advance
#187392
  • MarioPuco
  • MarioPuco's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 2096
  • Karma: 53
  • Thank you received: 166

MarioPuco replied the topic: option group visibility condition

Hello,


Visibility rules are working well for us, and you can see it here : screencast.com/t/I53OTsujMMf
Unfortunately we don't have an archive of older BF versions and we suggest you update your Joomla and things should work then :)


Regards,
Mario

===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
#187395
  • msantiago
  • msantiago's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 5
  • Thank you received: 0

msantiago replied the topic: option group visibility condition

at this moment is impossible for me upgrade joomla. i will upgrade in 2 months, but i need to put this form working now.

thanks in advance
#187432
  • MarioPuco
  • MarioPuco's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 2096
  • Karma: 53
  • Thank you received: 166

MarioPuco replied the topic: option group visibility condition

Hello,

If JavaScript Visibility rules don't work for you, maybe you can achieve the same thing with regular visibility rules explained in this article : crosstec.org/en/support/online-documenta...f-conditionally.html

Let us know if this worked for you.

Regards,
Mario

===============================================
Need to renew Pro Support?
Buy Here!
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
#187477
Moderators: ForumSupporttomeperica
Time to create page: 0.106 seconds

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

New extension AnalyticsAnywhere released!

Track website visitors no matter if ad blockers are enabled! Check it out!

Lifetime Subscription

Special Offer! Get lifetime access to all of our current and future products and 2 years of professional support -- 149 for only 90!

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, WordPress® plugins, Joomla!® templates   this means, by purchasing a Lifetime Subscription you'll have it all covered!

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 1-Year or Lifetime 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!

Pro Support Renewal Plans

If you just need professional support and no further access to downloads or simply want or need to renew professional support, you may choose between various support plans from here.