ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Show array value in checkboxes & save array key in Email and Database

mauropiro 18 Sep, 2018
Hello,

I have a form with the checkboxes component that receives the following array from my <clients> database table (read_data):

Array(
[david@company.com] => DAVID
[renata@company.com] => RENATA
)

On the browser I can see two check boxes: DAVID and RENATA, but in the email and in the database I need to be written:

david@company.com, renata@company.com

How can I do that?

Thank you

Mauro
GreyHead 19 Sep, 2018
1 Likes
Hi Mauro,

The simplest way is probably to set the dropdown values to be the email addresses; though ideally it is better not to show those in the form where they are visible to be scraped. An alternative solution is to add a Custom PHP action to look up the addresses and add them to the form data. There is a FAQ that shows you how to do that.

Bob
healyhatman 20 Sep, 2018
Just have the checkboxes as DAVID:DAVID etc, then read the database to get the email addresses when you need them.
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com