Forums

formatting of recieved email

rubayethk 19 Dec, 2007
Hi, i got a form working but i had one question.

I noticed that that the email i would get from the form had a large gap between the field(html form element name such as "name") and the value people would enter in the text box.

For example my email would look like

name Tom
email [email]tom@gmail.com[/email]

how can i reduce this spacing ? on Outlook this doesnt look good at all.

thanks in advance if anyone has some suggestions
GreyHead 19 Dec, 2007
Hi rubayethk,

ChronoForms simple creates a little table. The code is around line 350 of chronocontact.php (in the Joomla 1.0.x version)
                    $html_message .= "<tr height='10'>
	                   <td width='40%' class='tablecell1'>$name</td>
	                   <td width='60%' class='tablecell2'>$post</td>
	                   </tr>";
You can change this if you like, but probably it's simpler to create an email template and lay it out exactly the way you want.

Bob<br><br>Post edited by: GreyHead, at: 2007/12/19 18:06
rubayethk 19 Dec, 2007
Could you give me an example please? By email template do u mean making the form in dreamweaver and then pasting in chronoforms ? because i did make my form that way.

thanks for the quick replies.
GreyHead 19 Dec, 2007
Hi rubayethk,

On the ChronoForms Form Manager 'Form Code' tab you'll see a box titled 'Email template'. If you put some html (with php if you like) in there then ChronoForms will use that as a template for your email instead of the default table. You include results from your Form in thee form {field_name}. So an alternative might look like
<table>
  <tr>
    <td width=20% align=left>Name</td>
    <td width=80% align=left>{name}</td>
  </tr>
  <tr>
    <td>Email</td>
    <td>{email}</td>
  </tr>
</table>
or something quite different
<p>Hi {name},</p>
<p>Your email is {email}.</p>
<p>Best wishes<br />
Webmaster</p>
Up to you really.

Bob<br><br>Post edited by: GreyHead, at: 2007/12/19 18:38
This topic is locked and no more replies can be posted.