Customization
If you need to add more fields, others than from, subject, message, cc, bcc, you have to go back into web > templates > default_site > email.group and open the file _email_sender.html _with your preferred text editor( ex: Notepad++, VS Code, Atom, Sublime Text ). You have to COPY the next line as many time as fields do you want to use extra:
'custom_title' => (isset($_GET['custom_title'])) ? $_GET['custom_title'] : "",
And PASTE them between these lines:
37 // CHANGES AREA ---- begin ----
38
39
40 // CHANGES AREA ---- end ----
Now, all you need to do is to rename custom_title with your parameter name. Do this for all the lines that you added.
Example
I have the following lines in the the file email_sender.html
32 'bodyMsg' => array( 33 // to add more custom fields to the body message 34 // copy the next line between -- begin -- and -- end -- comments, without slashes and change the word custom_title with the name of your custom parameter 35 // 'custom_title' => (isset($_GET['custom_title'])) ? $_GET['custom_title'] : "", 36 37 // CHANGES AREA ---- begin ---- 38 39 40 // CHANGES AREA ---- end ---- 41 ),and I want to add two fields sent with GET method. Their name are: more_details and price.
All I need to do is to copy twice the below line:
'custom_title' => (isset($_GET['custom_title'])) ? $_GET['custom_title'] : "",and the code will look like here:
32 'bodyMsg' => array( 33 // to add more custom fields to the body message 34 // copy the next line between -- begin -- and -- end -- comments, without slashes and change the word custom_title with the name of your custom parameter 35 // 'custom_title' => (isset($_GET['custom_title'])) ? $_GET['custom_title'] : "", 36 37 // CHANGES AREA ---- begin ---- 38 39 'more_details' => (isset($_GET['more_details'])) ? $_GET['more_details'] : "", 40 'price' => (isset($_GET['price'])) ? $_GET['price'] : "", 41 42 // CHANGES AREA ---- end ---- 43 ),Don't forget to change the name of the fields custom_title, with yours, like in the example!