TOPIC:

Radio group write-protected or active (choose) depending on a second radio group 9 months 3 weeks ago #269049

  • Karlheinz68's Avatar Topic Author
  • Karlheinz68
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Patron (Hero Patron)
  • Posts: 56
  • Thanks: 2
Hi!

I have two radio groups

2 radio groups
(red, blue) and (1,2,3,4,5,6)

If I select red in the radio group 1 (red, blue), only 4,5,6 should be active (to be selected) in the other radio group.
If I choose blue in the radio group 1, only 1,2,3 should be active in the other radio group.

thx for help
Attachments:

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

Radio group write-protected or active (choose) depending on a second radio group 9 months 3 weeks ago #269054

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

please go to first radio button group choose1->Advanced->Actionscript->check Custom->check Change and put:
function ff_choose1_action(element, action) 
{
     switch (action)
     {
          case 'change':
          vals = '';
          
          opts = JQuery("[name=\"ff_nm_choose1[]\"]");
          for (o = 0; o < opts.length; o++)
          if (opts[o].checked)
          {
               vals = opts[o].value;
          }
           
          if (vals=="red") // here you can add further dependencies
          {
             jQuery('#ff_elem5036_3').attr('disabled', true);
              jQuery('#ff_elem5036_4').attr('disabled', true);
              jQuery('#ff_elem5036_5').attr('disabled', true);   
              jQuery('#ff_elem5036').attr('disabled', false);
              jQuery('#ff_elem5036_1').attr('disabled', false);
              jQuery('#ff_elem5036_2').attr('disabled', false);  
           
          }
          else if(vals=='blue') {
jQuery('#ff_elem5036').attr('disabled', true);
              jQuery('#ff_elem5036_1').attr('disabled', true);
              jQuery('#ff_elem5036_2').attr('disabled', true); 
jQuery('#ff_elem5036_3').attr('disabled', false);
              jQuery('#ff_elem5036_4').attr('disabled', false);
              jQuery('#ff_elem5036_5').attr('disabled', false);  
}
else {
jQuery('#ff_elem5036').attr('disabled', false);
              jQuery('#ff_elem5036_1').attr('disabled', false);
              jQuery('#ff_elem5036_2').attr('disabled', false); 
jQuery('#ff_elem5036_3').attr('disabled', false);
              jQuery('#ff_elem5036_4').attr('disabled', false);
              jQuery('#ff_elem5036_5').attr('disabled', false);  
}
               
          break;
          default:;
     } // switch
} // ff_second_action
#ff_elem5036_3 is ID of 4
#ff_elem5036_4 is ID of 5
#ff_elem5036_5 is ID of 6
#ff_elem5036 is ID of 1
#ff_elem5036_1 is ID of 2
#ff_elem5036_2 is ID of 3

To find ID, do the right click on browser and in Console find ID of each radio button

If you need more help, please let me know

Regards,
Tihana

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

Radio group write-protected or active (choose) depending on a second radio group 9 months 3 weeks ago #269062

  • Karlheinz68's Avatar Topic Author
  • Karlheinz68
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Patron (Hero Patron)
  • Posts: 56
  • Thanks: 2
thx... works perfect

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

Radio group write-protected or active (choose) depending on a second radio group 9 months 3 weeks ago #269067

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

np, anytime :)

If you need anything else, feel free to ask

Regards,
Tihana

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

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.046 seconds

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

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!