Page 1 of 1
form content after submission
Posted: Thu Sep 16, 2021 5:27 pm
by Chameleon
Hi,
Is there a way to break up the form content that is submitted via email?
at the moment I can get the form content submitted to me but it is in one long list with no structure to it. Is it possible to have say a blank line between some parts of the form data to separate it so that it can be in sections to make it easier to read?
is it possible to have the answers a different size/colour to differentiate from the question and answer?
thanks,
Re: form content after submission
Posted: Thu Sep 16, 2021 5:31 pm
by Pablo
Maybe this will be helpful?
viewtopic.php?f=10&t=64476
Re: form content after submission
Posted: Thu Sep 16, 2021 6:22 pm
by Chameleon
Cheers Pablo,
That looks like what I’m looking for. I will have a look and see if it works out the way I need it to. looks promising
Re: form content after submission
Posted: Thu Sep 16, 2021 8:56 pm
by Chameleon
ok, so I have made the changes and I can see how to format the form email to the layout that I require BUT im having problems getting the submitted data in the email. The layout is ok but no data is received. This is what I have chaned it to:
The following data has been submitted to the online form:
title: $title
first_name: $first_name:
last_name: $last_name:
gender: $gender:
maritial: $maritial:
dob1: $dob1:
section 2:
address1: $address1:
when the form is filled in online and I check the email I get exactly what I have changed but nothing has changed for the input data?
any thoughts?
Re: form content after submission
Posted: Thu Sep 16, 2021 10:35 pm
by GrahamW
maybe check your field names and also it looks like you have incorrect values as well it should be this. Take of the : and the end of the field names.
first_name: $first_name
last_name: $last_name
gender: $gender
maritial: $maritial
dob1: $dob1
section 2
address1: $address1
Graham
Re: form content after submission
Posted: Thu Sep 16, 2021 11:22 pm
by Chameleon
Cheers Graham,
nope not working. I have made the changes and still only getting the same output.
I have checked the field names and they are correct.
Re: form content after submission
Posted: Fri Sep 17, 2021 12:11 am
by crispy68
Here is a sample of a message I did for a site. I set the email format to HTML.
Code: Select all
<img src="https://www.mywebsite.com/images/logo.jpg"/><br><br>
<font style="color:#000000;font-family:Arial;font-size:19px">You just received an estimate request from your website.<br>
<br>
Here is what was submitted:<br>
<br>
<strong>Name :</strong> $name<br>
<strong>Phone :</strong> $phone<br>
<strong>Email :</strong> $email<br>
<strong>Message :</strong> $message<br>
</font>
Maybe this will help.
Re: form content after submission
Posted: Fri Sep 17, 2021 6:10 am
by Pablo
If there is no data then most likely the names of the form fields are do not match the variable names.
Re: form content after submission
Posted: Fri Sep 17, 2021 1:05 pm
by Chameleon
Hi Pablo,
I have tried everything I can think of but still no data. When I say no data I mean I get a reply but no form input data is received just the same data that I have entered e.g.
The following data has been submitted:
Title:
First Name: $First Name
Last Name: $Last Name
gender: $gender
maritial: $maritial
dob1: $dob1
section 2:
address1 $
If I revert back to plain text I get the email with the answeres submitted.
Just to clarafy can you confirm that I should be using the field name from the edit box and not the properties I.D. or the place holder text?
or is there another field name place that im missing?
cheere,
Re: form content after submission
Posted: Fri Sep 17, 2021 1:16 pm
by Pablo
"$First Name" is not a valid name. Variables may not have spaces. Also, note that names are case-sensitive.
Just to clarafy can you confirm that I should be using the field name from the edit box and not the properties I.D.
You will need to use the name of the input field, not the ID.
Names may not have spaces or other special characters.
See this FAQ:
viewtopic.php?f=10&t=64868
TIP:
First try with a simple form with just one input field and a simple name (like in the example).
Re: form content after submission
Posted: Fri Sep 17, 2021 2:03 pm
by Chameleon
Cheers Pablo,
Thats working now. I didnt allow for case sensitive or underscore to connect the words. Once I corrected this it started working.
Thanks for you help guys, much appreciated
Re: form content after submission
Posted: Sun Feb 20, 2022 4:15 pm
by Magical
This is what I do with the Form Processor Message Feature. I set it to return HTML and add the following to the box:
</tr>
<tr>
<td style="padding:10px">Name</td>
<td style="padding:10px">$name </td>
</tr>
<tr>
<td style="padding:10px">Contact Number</td>
<td style="padding:10px">$contact_number</td>
</tr>
<tr>
<td style="padding:10px">Email</td>
<td style="padding:10px">$email (please click the email address to respond)</td>
</tr>
<tr>
<td style="padding:10px">Message</td>
<td style="padding:10px">$contact_message</td>
</tr>
<tr>
<td style="padding:10px">Date Sent</td>
<td style="padding:10px">$datesent</td>
</tr>
<tr>
<td style="padding:10px">IP</td>
<td style="padding:10px">$ipaddress</td>
</tr>
</table>