TOPIC:

Auto select checkbox group 1 month 23 hours ago #247182

  • Topic Author
  • mrperfectpz
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 326
  • Thanks: 0
I have 2 checkbox groups, they both are identical (dont ask).
I would like to check the first checkbox and the second will auto select the same in the second checkbox group. They are multi select so I would need them to do the same for any selected.

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

Auto select checkbox group 1 month 22 hours ago #247186

  • tihana.krivic's Avatar
  • tihana.krivic
  • Online
  • Moderator
  • Moderator
  • Posts: 1260
  • Karma: 3
  • Thanks: 110
Hi,

go to your first checkbox group->Advanced->Actionscript->check Change->check custom->Create code framework and put this:
function ff_NAMEOFFIRSTCHECKBOX_action(element, action)
{
    switch (action) {
        case 'change':
if(jQuery('[name="ff_nm_NAMEOFFIRSTCHECKBOX[]"]:checked').val() == 'value1') {
      jQuery("#ff_elem12696").attr('checked','checked');  
}
            break;
        default:;
    } // switch
} // ff_NAMEOFFIRSTCHECKBOX_action

Please replace:
NAMEOFFIRSTCHECKBOX with name of your first checkboxgroup (not title)
value1 is value of first checkbox (replace it with yours)
#ff_elem12696 is ID of second checkboxgroup->replace it with yours (right click to your browser and inspect)

Let me know if it works for you

Regards,
Tihana

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

Auto select checkbox group 1 month 22 hours ago #247187

  • Topic Author
  • mrperfectpz
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 326
  • Thanks: 0
Hi Tihana

It kind of works but my checkbox group is auto populated so I cant have =='value1'.
Also it could be 10 or 200 values in checkbox

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

Last edit: Post by mrperfectpz.

Auto select checkbox group 1 month 19 hours ago #247190

  • tihana.krivic's Avatar
  • tihana.krivic
  • Online
  • Moderator
  • Moderator
  • Posts: 1260
  • Karma: 3
  • Thanks: 110
hm, can I take a look?
Is the login information the same as before?

Regards,
Tihana

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

Auto select checkbox group 1 month 3 hours ago #247211

  • Topic Author
  • mrperfectpz
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 326
  • Thanks: 0
Yes login is the same, form is JOIN_LEAGUE

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

Auto select checkbox group 1 month 2 hours ago #247216

  • tihana.krivic's Avatar
  • tihana.krivic
  • Online
  • Moderator
  • Moderator
  • Posts: 1260
  • Karma: 3
  • Thanks: 110
Hi,

can you please test this->
go to your first checkboxgroup->Advanced->Actionscript->check Custom->check Change->Create code framework and put this:
function ff_NAMEOFFIRSTCHECKBOX_action(element, action)
{
    switch (action) {
        case 'change':
if(JQuery('input[name="'+JQuery(element).attr('name')+'"]:checked'))
{
 jQuery("#ff_elem12798").attr('checked','true');
}

            break;
        default:;
    } // switch
} // ff_NAMEOFFIRSTCHECKBOX_action
Please replace NAMEOFFIRSTCHECKBOX with name of your first checkgroup, and #ff_elem12798 with ID of second checkgroup.

I will access to your page later, but I hope this helps

Let me know for " the result" :)

Regards,
Tihana

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

Time to create page: 0.044 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!