Visibility Rules

  • menusilva
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0

menusilva created the topic: Visibility Rules

Hi
I need some help on visibility rules or Actionscript on the element "select from list" on my joomla breezing form.
My Form got numberofcampuses - "select from list" - 1 value1, 2 value2, 3 value3
and also 3 sections: Campus1, Camus2, Campus3 to collect information.
Depend on the selection numberofcampuses, Sections Campus1, Campus2 or Campus3 will be visible on the Form.

When user select 1 from the drop down only section 1 will be visible.
When user select 2 from the drop down section 1 and 2 need to be visible.
When user select 3 from the drop down all the sections 1,2,3 need to visible.
When user select 1 again from the drop down, section2 and 3 need to invisible.

Thank you in advance!
menusilva
#234958
Attachments:
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 2360
  • Karma: 85
  • Thank you received: 316

mihaela replied the topic: Visibility Rules

Hello,

To make this work as you want, you should follow instruction from here crosstec.org/en/support/online-documenta...s-in-javascript.html .

The Actionscript code that you would put in Actionscript section for "" element in your case would look similar to this:
function ff_numberofcampuses_action(element, action)
{
    if ( element.value == "value1" || element.value == "value2" || element.value == "value3"  ) {
             bfToggleFields('on','section','Campus1',bfDeactivateField);
    }
    else  {
             bfToggleFields('off','section','Campus1',bfDeactivateField);
    }

    if ( element.value == "value2" || element.value == "value3"  ) {
             bfToggleFields('on','section','Campus2',bfDeactivateField);
    }
    else  {
             bfToggleFields('off','section','Campus2',bfDeactivateField);
    }

    if ( element.value == "value3"  ) {
             bfToggleFields('on','section','Campus3',bfDeactivateField);
    }
    else  {
             bfToggleFields('off','section','Campus3',bfDeactivateField);
    }
} // ff_numberofcampuses_action

Let me know whether you have managed to set this for your form and whether it works as you wanted.

Regards,

Mihaela
#234974
  • Posts: 18
  • Thank you received: 0

codeworks replied the topic: Visibility Rules

Thank you, Mihaela.
Above did not work even though I renamed my elements exact as you have named, sure why but following are the exact codes I need. It is working.
But I still prefer to get this work with a function. If you have time to guide me.
Thanks again.

secframe1 always visible with dropdown 1 default value

turn off section secframe2 if numberofcampuses isnot 2
turn off section secframe3 if numberofcampuses isnot 3
turn off section secframe4 if numberofcampuses isnot 4
turn off section secframe5 if numberofcampuses isnot 5
turn off section secframe6 if numberofcampuses isnot 6

turn on section secframe2 if numberofcampuses is 2
turn on section secframe2 if numberofcampuses is 3
turn on section secframe2 if numberofcampuses is 4
turn on section secframe2 if numberofcampuses is 5
turn on section secframe2 if numberofcampuses is 6

turn on section secframe3 if numberofcampuses is 3
turn on section secframe3 if numberofcampuses is 4
turn on section secframe3 if numberofcampuses is 5
turn on section secframe3 if numberofcampuses is 6

turn on section secframe4 if numberofcampuses is 4
turn on section secframe4 if numberofcampuses is 5
turn on section secframe4 if numberofcampuses is 6

turn on section secframe5 if numberofcampuses is 5
turn on section secframe5 if numberofcampuses is 6

turn on section secframe6 if numberofcampuses is 6
#235349
Moderators: ForumSupporttomeperica
Time to create page: 0.061 seconds

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans & templates!

Get Your Subscription Here

News and Updates

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

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions 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 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 to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here