Is it possible to extend the visibility rules? I would need rules with more dependencies.

 

To implement more complex rules, it is possible to introduce rules into ActionScripts using the bfToggleFields() method.

Note: To use this method you must have previously defined at least one dummy visibility rule like:

 turn on element mydummy if yourdummy is something

Example for a script into a checkbox element:

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);
          }
          else
          {
               return bfToggleFields('off','section','sec2',bfDeactivateField);
          }
          break;
          default:;
     } // switch
} // ff_checkbox_action

 

 Example for radio and checkbox groups which need a special code in order to read the current value:

function ff_radioelem_action(element, action) //where radioelem is the name of the radio group
{
     switch (action)
     {
          case 'change':
          vals = '';
          opts = JQuery("[name=\"ff_nm_radioelem[]\"]");
          for (o = 0; o < opts.length; o++)
          if (opts[o].checked)
          {
               vals = opts[o].value;
          }
          if (vals=="yes") // here you can add further dependencies
          {
               return bfToggleFields('on','section','sec3',bfDeactivateField);
          }
          else
          {
               return bfToggleFields('off','section','sec3',bfDeactivateField);
          }
          break;
          default:;
     } // switch
} // ff_radioelem_action

 

 

 

Special Offer

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!

Live Support Chat Opened!

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