Hi,
I've got a form that requests information from our student and emails it to our advisors. For now this function is all I'm working on, later I'd like to instead be able to save it to a database and email a link of the saved form instead of the contents of the form. I'm interested in how I should use form data for email variables. I have seen this thread:
http://www.chronoengine.com/index.php?option=com_fireboard&Itemid=37&func=view&id=5672&catid=2
And I've seen the tutorial, but I must be missing something "obvious" somewhere. I have these fields in my Form HTML:
I'll be transforming it to a CSS-based layout later, so please just ignore the table formatting for now🙂
And then in the second tab called "Special Fields" I have subject name and email in the corresponding fields. Then in the next tab in the OnSubmit before email is sent I have the following PHP code:
Yet when I fill out the form with a name, ID and email address, I only get the name and email variables working (they show up in the From line); the subject is always blank. If I remove the OnSubmit code, the special fields "subject" and put something in the General subject box, it gets passed through appropriately.
Is it something wrong with my PHP code? Any help would be appreciated!
-Chad
I've got a form that requests information from our student and emails it to our advisors. For now this function is all I'm working on, later I'd like to instead be able to save it to a database and email a link of the saved form instead of the contents of the form. I'm interested in how I should use form data for email variables. I have seen this thread:
http://www.chronoengine.com/index.php?option=com_fireboard&Itemid=37&func=view&id=5672&catid=2
And I've seen the tutorial, but I must be missing something "obvious" somewhere. I have these fields in my Form HTML:
<td>Name:</td>
<td colspan="3"><input name='name' type='text' size="30" /></td>
</tr>
<tr>
<td>Student ID: </td>
<td colspan="3"><input name='studentID' type='text' size="20" /></td>
</tr>
<tr>
<td>Email address: </td>
<td colspan="3"><input name='email' type='text' size="40" /></td>
I'll be transforming it to a CSS-based layout later, so please just ignore the table formatting for now🙂
And then in the second tab called "Special Fields" I have subject name and email in the corresponding fields. Then in the next tab in the OnSubmit before email is sent I have the following PHP code:
<?php $_POST['subject'] = "Major Status application for" $_POST['name'] ?>
Yet when I fill out the form with a name, ID and email address, I only get the name and email variables working (they show up in the From line); the subject is always blank. If I remove the OnSubmit code, the special fields "subject" and put something in the General subject box, it gets passed through appropriately.
Is it something wrong with my PHP code? Any help would be appreciated!
-Chad