TOPIC:

Turn on/off element if : many conditions 5 months 1 week ago #275103

  • Topic Author
  • caissier@scmf.ch
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
Hi,
I know the command : turn off element name if participation is No

But now I want to have something like this : turn off element name if participation is No and lastname is Ok

How to do this ?

Thanks
Yves

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

Turn on/off element if : many conditions 5 months 1 week ago #275115

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 11643
  • Karma: 3
  • Thanks: 756
Hi,

then for this is the best to use javascript and visibility rules:
crosstec.org/en/support/online-documenta...s-in-javascript.html

Don't forget to add in form->Advanced->Visibility rules:
 turn on element mydummy if yourdummy is something
Leave it as it don't change anything

If you want I can integrate it for you, then I need your backend link, and login information

Use this tag:
[confidential]
[/confidential]

Regards,
Tihana

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

Turn on/off element if : many conditions 5 months 1 week ago #275140

  • Topic Author
  • caissier@scmf.ch
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
Hi,
Thanks for tis informations.

Now I would like to have the possibility to activate many fields with one condition, something like this :
function ff_checkbox_action(element, action) //where checkbox is the name of the checkbox element
{
     switch (action)
     {
          case 'change':
          if (ff_getElementByName('checkelem').checked && 1==1 ) //here you can add further dependencies 1==1 will always be true :D
          {
               return bfToggleFields('on','section','sec2',bfDeactivateField);
              [b]return bfToggleFields('on','element','elem2',bfDeactivateField);[/b]
              [b]return bfToggleFields('on','element','elem4',bfDeactivateField);[/b]
          }
          else
          {
               return bfToggleFields('off','section','sec2',bfDeactivateField);
          }
          break;
          default:;
     } // switch
} // ff_checkbox_action

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

Turn on/off element if : many conditions 5 months 6 days ago #275147

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 11643
  • Karma: 3
  • Thanks: 756
Hi,

if you want to add many conditions then remove return, return will "return" only first condition, so the code for many condition should be like:
function ff_checkbox_action(element, action) //where checkbox is the name of the checkbox element
{
     switch (action)
     {
          case 'change':
          if (ff_getElementByName('checkelem').checked && 1==1 ) //here you can add further dependencies 1==1 will always be true :D
          {
               bfToggleFields('on','section','sec2',bfDeactivateField);
              bfToggleFields('on','element','elem2',bfDeactivateField);[/b]
              bfToggleFields('on','element','elem4',bfDeactivateField);[/b]
          }
          else
          {
               bfToggleFields('off','section','sec2',bfDeactivateField);
          }
          break;
          default:;
     } // switch
} // ff_checkbox_action
If you need more help,let me know

Regards,
Tihana
The following user(s) said Thank You: caissier@scmf.ch

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

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