• 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: Parse Checkbox values in Email

Parse Checkbox values in Email 16 years 7 months ago #4738

I created a checkbox group called cbxInterests, with five items: Skiing, Mountain Bike, Snow boarding, Hockey, Snow Mobiling.
In my form, the user clicks three items, say Skiing, Hockey, ans Snow Mobiling.

I then create an email, either in usermail or adminmail (both using HTML type), specifying {cbxInterests:value}.

The resultant email has this exact string in it:
Skiing Hockey Snow Mobiling

I want to be able to parse this string and inject the HTML \"<BR>\" to render this:
Skiing
Hockey
Snow Mobiling

Ideally, I'd also like the flexibility to list all items this way, whether or not the user selected them. If possible, I'd like to see all five items, with checkboxes AND the items selected having a checkmark in thier check boxes, just like they see on the screen BEFORE they click submit.
The administrator has disabled public write access.

Re:Parse Checkbox values in Email 16 years 7 months ago #4739

  • richiep
  • richiep's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 131
I'd like to do something similar but rather than a <br/> I'd like to have a comma.

How can we do this?
Thanks
Richiep
The administrator has disabled public write access.

Re:Parse Checkbox values in Email 16 years 7 months ago #4745

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

This can be done by going to /components/com_rsform/controller/functions.php ... around line 990 you will find this:

$val = (is_array($val) ? implode(\"\n\",$val) : $val);

instead of \n put whatever you like.

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

Re:Parse Checkbox values in Email 16 years 3 months ago #6260

  • cindyD
  • cindyD's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
For the admin email, I've been asked if I can eliminate the 'n' separating multiple selections for a checkbox group. I'd like to change it to ',' . The answer below seemed perfect, but I cannot find this code in functions.php. I'm using RsForm Pro version 1.1.0.
Appreciate any advice


alexp wrote:
Hello,

This can be done by going to /components/com_rsform/controller/functions.php ... around line 990 you will find this:

$val = (is_array($val) ? implode(\"\n\",$val) : $val);

instead of \n put whatever you like.

Regards!
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!