Contact Lister - added new field (Phone), how to have this send in the contact email
I have added an addditional field in the contact form, see below:
phone.png
using:
<li>
<label><?php _e('Phone:', 'cp') ?></label>
<input name="phone" id="phone" type="text" minlength="2" value="<?php if(isset($_POST['phone'])) echo stripslashes($_POST['phone']); ?>" class="text required" />
<div class="clr"></div>
</li>
however , i need the submitted number to be emailed to the lister, the instructions i've retrieved online may be outdated (although the above was achieve following the same solution:
The you need also to edit the theme-emails.php by adding the following code;
$message .= "Sent by : ".wordwrap(strip_tags($_POST['from_name']), 70) . "\r\n\r\n";
$message .= "Phone : ".wordwrap(strip_tags($_POST['phone']), 70) . "\r\n\r\n";
You need to put it right after this code in the theme-emails.php specifically the // ad poster sidebar contact form email block;
$message .= $siteurl . "\r\n\r\n";
There doesnt seem to be a theme-emails.php in the latest classipress if anyone knows how to complete this I would appreciate the help
thanks