March 13, 2013 at 1:46 pm
#99
Keymaster
Hi,
First thing you gotta do is to go to the file js/views/view.contact.js and remove that line:
subject: {
required: true
},
It will make the subject not required anymore.
For new fields, you just need to add it in the html and then add the reference to the PHP send the email:
Open php/contact-form.php
And do something like this:
$fields = array(
0 => array(
'text' => 'Name',
'val' => $_POST['name']
),
1 => array(
'text' => 'Email address',
'val' => $_POST['email']
),
2 => array(
'text' => 'Message',
'val' => $_POST['message']
),
3 => array(
'text' => 'Field Name',
'val' => $_POST['fieldID']
)
);
Replace the Field Name and fieldId to match what you put in the HTML file.