Bienvenido, Invitado
Recordarme

TEMA:

Radio Group : copy value to another radio group 10 meses 4 días antes #268706

  • Autor del tema
  • Gilles361
  • Fuera de línea
  • Expert Breezer
  • Expert Breezer
  • Mensajes: 313
  • Gracias recibidas: 7
Hi,
I have two radio groups: Route and Famille (5 buton values)
I select only one group using visibiltiy rules

When selecting "Famille", I would like to copy its value to "Route" element

How to do so?
What Element Action/Init script to write?

Thanks,
Gil

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Radio Group : copy value to another radio group 10 meses 4 días antes #268715

  • Avatar de tihana.krivic
  • tihana.krivic
  • Fuera de línea
  • Moderator
  • Moderator
  • Mensajes: 11788
  • Karma: 3
  • Gracias recibidas: 762
Hi,

basically, when radio button in Famille is selected, radio button in Route can be checked too based on value like this:
1) go to first radio button group let's say Famillie->Advanced->Actionscript->check Custom->Check change and put:
function ff_nameoffirstradiogroup_action(element, action) 
{
     switch (action)
     {
          case 'change':
          vals = '';
          
          opts = JQuery("[name=\"ff_nm_nameoffirstradiogroup[]\"]");
          for (o = 0; o < opts.length; o++)
          if (opts[o].checked)
          {
               vals = opts[o].value;
          }
         
           
          if (vals=="yes") // here you can add further dependencies
          {
             jQuery('#ff_elem4291').prop('checked', true);
             
           
          }
               
          break;
          default:;
     } // switch
} // ff_nameoffirstradiogroup_action
Please replace nameoffirstradiogroup with name of your radio group for Famille (not title).

yes is value of this radio group, replace it with yours

#ff_elem4291 is ID of second radio group (let say Route).
To get this do the right click on Browser->Inspect->find ID of that group you want to be changed based on value in first radio group

I hope I explained it well

Let me know if you need more help

Regards,
Tihana

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

  • Página:
  • 1
Tiempo de carga de la página: 0.049 segundos