• 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: Radio group description in e-mail?

Radio group description in e-mail? 13 years 5 months ago #11863

  • djowie
  • djowie's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Is it possible to receive the radiobutton description in the email?

I have a few options like:

11.25|machine1
12.95|machine2
12.95|machine3

i use the value for price calculation (works fine). But i also want to receive the description to know which machine they've chosen...
The administrator has disabled public write access.

Re:Radio group description in e-mail? 13 years 5 months ago #11894

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

Yes, this is possible but you will have to add some custom javascripts in order to achieve this. Basically you will have to add a hidden field that will store the label of the selected item.

In the CSS/Javascript section you will have to use a script similar to this:
<script type="text/javascript">
function grabDesc(param)
{
	for(i=0;i<document.getElementsByName('form['+param+']').length;i++)
		if(document.getElementById(param+i).checked)
			for(j=0;j<document.getElementsByTagName('label').length;j++)
				if(document.getElementsByTagName('label')[j].getAttribute('for') == param+i)
					document.getElementById('name_of_hidden_field').value = document.getElementsByTagName('label')[j].innerHTML;
}
</script>

In the Additional Attributes area you will have to add something like this:
onclick="grabDesc('name_of_radio_group');"
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 13 years 5 months ago by alexp.
The administrator has disabled public write access.

Re:Radio group description in e-mail? 13 years 2 months ago #12861

  • mark33
  • mark33's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi,

I am trying to do this and keep getting stuck. Any chance of a bit more information. Which parts of the script do I need to modify?
In the Additional Attributes area you will have to add something like this:


Code:


onclick="grabDesc('name_of_radio_group');"

Is this for the submit button or the radio button?
I have searched the forum thoroughly and found this to be a common problem without any clear solutions.

Thanks for any help,

Mark.
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!