Forums

Pulling Data from the tables for On Submit

sdlacy 23 May, 2008
I just found out about Chronoforms today and this is amazing software! Unfortunately I am very new and having trouble creating a form.

I'll try to make this as simple as possible, but I'm not sure what I'm talking about, so please bear with me.

1: I've created a registration form in the 'Form HTML' area and created the associated tables to go with it.
2: I've tested the email sent out after the user hits the submit button

My problem comes in here.....

3: In the 'On Submit code - After Sending Email' Area I have posted the content I want the user to see after hitting the Submit button.

A portion of my code is:
<b>Your Name:</b> {forename} {surname}<br> 
<b>Your Age:</b> {age}<br> 
<b>Resident in:</b> {nation}<br> 


Unfortunately, when the user hits submit the fields are not translated...it just shows exactly as it's posted above.

How do I get the fields (forename, surname, age, etc.) to pull the actual data from the fields?
GreyHead 25 May, 2008
Hi sdlacy,

Unlike the email template box ChronoForms doesn't do any automatic substitution in this box. You need to add a little php code:
<b>Your Name:</b> <?php echo $_POST['forename']." ".$_POST['surname']; ?><br>  
<b>Your Age:</b> <?php echo $_POST['age']; ?><br> 
<b>Resident in:</b> <?php echo $_POST['nation']; ?><br>
Bob
This topic is locked and no more replies can be posted.