TOPIC:

Submission script : Change value of a radio buton group 5 months 1 week ago #275186

  • Topic Author
  • caissier@scmf.ch
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
Hi,
I would like on the Submission script change the value of a radio group.

According to a value of a radio group I want to change the value of a second radio group. The second radio group has only the value Yes or No.

How to do that ?

Thank you

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

Submission script : Change value of a radio buton group 5 months 1 week ago #275188

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

please go to your first radio group->Advacned->Actionscript->check Custom and put:
function ff_firstradiogroup_action(element, action)
{
    switch (action) {
        case 'change':
vals = '';
          
          opts = JQuery("[name=\"ff_nm_firstradiogroup[]\"]");
          for (o = 0; o < opts.length; o++)
          if (opts[o].checked)
          {
               vals = opts[o].value;
          }
if(vals=="somevalue") {
jQuery('#ff_elem8485').attr('disabled', true);
}
           
            break;
        default:;
    } // switch
} // ff_firstradiogroup_action
Please replace :
firstradiogroup with name of first radio group (not title)
somevalue with value of your first radio group
#ff_elem8485 with ID of value of second radio group

If someone select somevalue from first radio group, then value with ID of second radio radio group will be disabled

If you want to add some specific value let me know and I will test

I hope I explain it well

Regards,
Tihana

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

Submission script : Change value of a radio buton group 5 months 1 week ago #275191

  • Topic Author
  • caissier@scmf.ch
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 14
  • Thanks: 0
I have tested this : jQuery('#ff_elem768').attr('checked', false);

But is not really what I want. The radio group has two values Yes and No.
I want to set checked=false for Yes and Checked=true for the No Value.

How to do that ?
Thansk

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

Submission script : Change value of a radio buton group 5 months 1 week ago #275195

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 11658
  • Karma: 3
  • Thanks: 757
Hi,
jQuery('#ff_elem768').prop('checked', false);
This means that radio group will not be checked if some value from first radio group is checked

Please test like this and let me know

Regards,
Tihana

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

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