Forums

'Tricky' form value to send with email

nilubon03 19 Mar, 2015
Hello,
I have a selection form which allow teachers to select student(s). The selection form select data from database display student name and information along with a checkbox. Teachers can look at student name and information, then click checkbox(es) to select student(s). When click submit, it will send email to the program coordinator inform this teacher select this student.

I tried to have a cf_id as a hidden value along with the checkbox, but I could not refer those cf_id tie back to student name and information and display it in an email.

Please advise.
Thank you,
Nilubon
nilubon03 19 Mar, 2015
Thank you Bob.

I may not explain well enough. Let me start over.

Attached is my selection form. The check box has value = cf_id. When teacher make selections and click submit, it will go to Email. My issue is the value from form to email is a cf_id, not first name, last name, school name. I want the content in email display first name, last name, and school name instead of cf_id. How can I accomplish this?

First, I had a hidden field that contain all 3 info along with checkbox, then I ran into the issue that it returned one value, no space between that, and it is difficult to read.
echo "<input type="."hidden"." value =" . $r['FirstName'] . $r['LastName'] . $r['SchoolName'] . " name ="."fname"." >";


Thank you,
Nilubon
GreyHead 23 Mar, 2015
Answer
Hi Nilubon,

You can either save the formatted value with added spaces:
echo "<input type='hidden' value='{$r['FirstName']} {$r['LastName']} {$r['SchoolName']}' name='fname' />";

Or you can add a DB Read action to the On Submit event and look up the values from there using the value of cf_id.

Bob
nilubon03 23 Mar, 2015
Hi Bob,
The value with added space worked perfectly.
Thank you very much.
Nilubon
This topic is locked and no more replies can be posted.