I am trying to enter the sender's name and some text into the subject line of emails submitted via our form. I get the text to fill in, but the name does not. Here is the code.
<?php
$form->data['subject'] = "Online Application from {$form->data['input_firstname']} ";
?>
what am i doing wrong?
Thanks
<?php
$form->data['subject'] = "Online Application from {$form->data['input_firstname']} ";
?>
what am i doing wrong?
Thanks
Hi tjhaas,
Please see this FAQ - the code needs to go into a Custom Code action before the email action.
Bob
Please see this FAQ - the code needs to go into a Custom Code action before the email action.
Bob
It is in a custom code action that is placed before the email action. If I understand correctly, at any rate. Image attached. I did read the FAQ several times . . . that is how I managed to get this far with it. :-)
The text from the code does populate the subject field, it is the dynamic info from the form that does not populate. What could cause that?
Thanks
The text from the code does populate the subject field, it is the dynamic info from the form that does not populate. What could cause that?
Thanks
yes
Hi tkjhaas,
Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.
Bob
Please drag a Debugger action into the On Submit event, then submit the form and post the debug - including the 'dummy emails' results here.
Bob
Array
(
[chronoform] => employment
[event] => submit
[firstname] => Tim
[middle] => J
[lastname] => Haas
[address] => t
[city] => t
[state] => tt
[zip] => 55555
[phone] => 555-555-5555
[email] => aaa@xxx.com
[position] => t
[datestart] => 02/22/2022
[salary] => 2
[where] =>
[school] =>
[years] =>
[subjects] =>
[school1] =>
[years1] =>
[school2] =>
[years2] =>
[subjects2] =>
[school3] =>
[years3] =>
[subjects3] =>
[specialstudy] =>
[specialskills] =>
[activities] =>
[branch] =>
[rank] =>
[from1] =>
[to1] =>
[employername1] =>
[salary1] =>
[position1] =>
[reasonleaving1] =>
[from2] =>
[to2] =>
[employername2] =>
[salary2] =>
[position2] =>
[reasonleaving2] =>
[from3] =>
[to3] =>
[employername3] =>
[salary3] =>
[position3] =>
[reasonleaving3] =>
[likebest] =>
[why] =>
[reference1] =>
[referenceaddress1] =>
[referencephone1] =>
[reference2] =>
[referenceaddress2] =>
[referencephone2] =>
[reference3] =>
[referenceaddress3] =>
[referencephone3] =>
[comments] =>
[captcha] =>
[input_submit_17] => Submit
[subject] => Online Application from
[ip_address] => 173.19.108.67
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
[2] => Array
(
[Email] => Array
(
[0] => An email with the details below was sent successfully:
[1] => To:aaa@xxx.com
[2] => Subject:Online Application from
[3] => From name:AEM Mechanical Services, Inc.
[4] => From email:aaa@xxx.com
[5] => CC:
[6] => BCC:
[7] => Reply name:
[8] => Reply email:aaa@xxx.com
[9] => Attachments:
[10] => Body:
<table>
<tr><td></td><td></td></tr>
<tr><td><h2>Personal Information</h2></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td>First Name: </td><td>Tim</td></tr>
<tr><td>Middle Initial:</td><td>J</td></tr>
<tr><td>Last Name:</td><td>Haas</td></tr>
<tr><td>Mailing Address:</td><td>t</td></tr>
<tr><td>City:</td><td>t</td></tr>
<tr><td>State:</td><td>tt</td></tr>
<tr><td>Zip Code:</td><td>55555</td></tr>
<tr><td>Phone Number:</td><td>555-555-5555</td></tr>
<tr><td>E-mail Address:</td><td>tim.haas@midmnmarketing.com</td></tr>
<tr><td></td><td></td></tr>
<tr><td>I am 18 years of age or older:</td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td>I can be lawfully employed in the U.S.</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td><h2>Employment Desired</h2></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td>Position Desired:</td><td>t</td></tr>
<tr><td>Date you can start:</td><td>02/22/2022</td></tr>
<tr><td>Desired Salary:</td><td>2</td></tr>
<tr><td></td><td></td></tr>
<tr><td>I am currently employed.</td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td>May we contact your employer?</td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td>Have you worked for us before?</td><td></td></tr>
<tr><td>If so, when?</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td><h2>Education</h2></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td>Grammar School:</td><td></td></tr>
<tr><td>Name/Address of School</td><td></td></tr>
<tr><td>Years Attended</td><td></td></tr>
<tr><td>Graduated?</td><td></td></tr>
<tr><td>Subjects Studied</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td>High School:</td><td></td></tr>
<tr>
<td>Name & address of school:</td><td></td></tr>
<tr>
<td>Years attended:</td><td></td></tr>
<tr>
<td>Did you graduate?</td><td></td></tr>
<tr>
<td>Subjects studied?</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td>College:</td><td></td></tr>
<tr>
<td>Name & address of school:</td>
<td></td></tr>
<tr>
<td>Years attended:</td>
<td></td></tr>
<tr>
<td>Did you graduate?</td>
<td></td></tr>
<tr>
<td>Subjects studied?</td>
<td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td>Trade, Business or Online School:</td><td></td></tr>
<tr>
<td>Name & address of school:</td>
<td></td></tr>
<tr>
<td>Years attended:</td>
<td></td></tr>
<tr>
<td>Did you graduate?</td>
<td></td></tr>
<tr>
<td>Subjects studied?</td>
<td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td><h2>General Information</h2></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr>
<td>My areas of special study:</td><td></td></tr>
<tr><td></td><td></td></tr>
<tr>
<td>My special skills:</td><td></td></tr>
<tr><td></td><td></td></tr>
<tr>
<td>Civic activities I am involved in:</td><td></td></tr>
<tr><td>U.S. Military Service:</td><td></td></tr>
<tr><td>Branch:</td><td></td></tr>
<tr><td>Rank:</td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td>I am a member of the National Guard or Reserves.</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td><h2>Former Employers</h2></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td>From:</td><td></td></tr>
<tr><td>To:</td><td></td></tr>
<tr><td>Name / Address of Employer:</td><td></td></tr>
<tr><td>Salary:</td><td></td></tr>
<tr><td>Position Held:</td><td></td></tr>
<tr><td>Reason for Leaving:</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td>From:</td><td></td></tr>
<tr><td>To:</td><td></td></tr>
<tr><td>Name / Address of Employer</td><td></td></tr>
<tr><td>Salary:</td><td></td></tr>
<tr><td>Position Held:</td><td></td></tr>
<tr><td>Reason for Leaving:</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td>From:</td><td></td></tr>
<tr><td>To:</td><td></td></tr>
<tr><td>Name / Address of Employer</td><td></td></tr>
<tr><td>Salary:</td><td></td></tr>
<tr><td>Position Held:</td><td></td></tr>
<tr><td>Reason for Leaving:</td><td></td></tr>
<tr><td>Which did you like the best?</td><td></td></tr>
<tr><td>Why?</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td><h2>Refernces</h2></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td>Name:</td><td></td></tr>
<tr><td>Address:</td><td></td></tr>
<tr><td>Years Known:</td><td></td></tr>
<tr><td>Phone Number:</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td>Name:</td><td></td></tr>
<tr><td>Address:</td><td></td></tr>
<tr><td>Years Known:</td><td></td></tr>
<tr><td>Phone Number:</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td>Name:</td><td></td></tr>
<tr><td>Address:</td><td></td></tr>
<tr><td>Years Known:</td><td></td></tr>
<tr><td>Phone Number:</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Additional Information to consider:</td><td></td></tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr><td><h2>Signature</h2></td><td></td></tr>
<tr><td></td><td></td></tr>
<tr>
<td>My Electronic Signature:</td><td></td></tr>
<tr><td></td><td></td></tr>
<tr><td></td><td></td></tr>
</table><br /><br />IP: 173.19.108.67
)
)
)
Hi tjhaas,
I see an input with the name 'firstname' but not 'input_firstname'
Bob
I see an input with the name 'firstname' but not 'input_firstname'
Bob
Ah, thank you. It is working fine now.
This topic is locked and no more replies can be posted.