• 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: copy fields

copy fields 14 years 4 months ago #901

  • de Rooy
  • de Rooy's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 22
Is it possible to have a checkbox that when selected that some other fields are copied into other fields on the same form. The reason is because of a form to request ADSL in the netherlands and the installation adress can be different from the administration adres.
The administrator has disabled public write access.

Re:copy fields 12 years 2 months ago #8350

I was looking up an answer to the exact same question. If anyone knows how to do this it will be appreciated.
The administrator has disabled public write access.

Re:copy fields 12 years 3 weeks ago #8610

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 179
Hello,

This can be done... You will have to add this in the Form Style area:
<script type="text/javascript">
function rsCopyText()
{
if(document.getElementById('check0').checked)
document.getElementById('field2').value = document.getElementById('field1').value;
 
else
document.getElementById('field2').value = '';
}
</script>

You will also have to add this in the Additional Attributes area of the checkbox group:

onclick ="rsCopyText();"
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
The following user(s) said Thank You: hcs76

Re:copy fields 7 years 4 months ago #27920

I doesn t work. I think. Problem is in parameter Check0. Is it chceckbox group or chceckbox item? I have checkbox group named copy_group and chcecbox item named copy. What can I put instead "check0". Thanks.
The administrator has disabled public write access.

Re:copy fields 7 years 4 months ago #27921

  • alexp
  • alexp's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 2253
  • Thank you received: 179
cesnak.marek wrote:
I doesn t work. I think. Problem is in parameter Check0. Is it chceckbox group or chceckbox item? I have checkbox group named copy_group and chcecbox item named copy. What can I put instead "check0". Thanks.

I can assure you that it does work. You most likely haven't applied this properly. If you can have a checkbox group named "check", then the first item from the group will have the "check0" id. Second item would have "check1" and so on...

PS: You can always check out the page source code so you can see your exact HTML.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
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!