• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: How to fill fields when a checkbox group is select

How to fill fields when a checkbox group is select 3 years 4 weeks ago #41124

  • rgouyon
  • rgouyon's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Thank you received: 1
Hello

I have a form with address,email ,phone field to register members of a sport club. When the member is not adult I need to have the address,email ,phone of the legal representative.
But very often he has the same address,email and phone as the member. So I have put a checkbox group to check if it is the case.
When this checkbox group is checked I want to copy member's address,email ,phone field into the legal representative's address,email ,phone field.
I made this code to do so but I don't know how to run copie function when my checkbox group is checked
function copie()
{
n=document.getElementById('fadrp1egaladr').value;
if(n==0)
{
  var elemmb = ["fadresse", "femail","telephone"];
  var elemp1 = ["fadressep1", "femailp1","telephonep1"];
 
  for(var i= 0; i < elemmb.length; i++)
    {
      document.getElementById(elemp1[i]).value =document.getElementById(elemmb[i]).value;
    }
}
Thank's for help
Last Edit: 3 years 4 weeks ago by rgouyon.
The administrator has disabled public write access.

How to fill fields when a checkbox group is select 3 years 2 weeks ago #41178

  • dragos
  • dragos's Avatar
  • NOW ONLINE
  • Administrator
  • Posts: 563
  • Thank you received: 102
Hello,

You can take a look at this article.
The administrator has disabled public write access.

How to fill fields when a checkbox group is select 3 years 2 weeks ago #41182

  • rgouyon
  • rgouyon's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Thank you received: 1
The problem was in the "Attributes" tab, I had to add onclick="copie();"
Is the some where a list of this kind of actions?
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!