sujithm Posted January 14, 2016 Share Posted January 14, 2016 Hello I would like to customize email messages sent while submitting pre-sales contact form. Now in the email, only the message part entered by the visitors is shown. I would like to add the name & email fields also as a part of the mail message sent. Where/How could I edit this? Thanks & Regards Sujith 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 14, 2016 Share Posted January 14, 2016 Hi Sujith, I don't think that you can edit it - it doesn't use an email template and is hard-coded... perhaps it can be tweaked with an action hook, but i'm not sure. the alternative would be to use a support department instead - that might allow you the flexibility to modify the template output to your needs. http://docs.whmcs.com/Mail_Tab#Presales_Form_Destination_OR_Presales_Contact_Form_Email 0 Quote Link to comment Share on other sites More sharing options...
sujithm Posted February 2, 2016 Author Share Posted February 2, 2016 Hi Sujith, I don't think that you can edit it - it doesn't use an email template and is hard-coded... perhaps it can be tweaked with an action hook, but i'm not sure. the alternative would be to use a support department instead - that might allow you the flexibility to modify the template output to your needs. http://docs.whmcs.com/Mail_Tab#Presales_Form_Destination_OR_Presales_Contact_Form_Email Hi Briani Thanks for your response. If we use support department, all requests coming through contact form will be considered as tickets. Right? In my case, the details sent as email from contact form is perfectly alright. What I need is to add a new field in the contact form for telephone and when we receive email, it should contain the telephone number of the person who submitted contact form. Let me look for the option with hooks. I haven't ever worked with hooks, but I think this will be the best option (if it works). Thanks & Regards Sujith 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted February 2, 2016 Share Posted February 2, 2016 Hello, One option is to add your own contact form to replace the WHMCS one, you could do this by editing your template's contact.tpl file. If you use a service such as Jot Form it'll be easy to build your own contact form. Jack 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted February 3, 2016 Share Posted February 3, 2016 One option is to add your own contact form to replace the WHMCS one, you could do this by editing your template's contact.tpl file. If you use a service such as Jot Form it'll be easy to build your own contact form. Jack, worryingly I had the same thought this morning - great minds think alike... though perhaps i'm more old-school as I was thinking of a php formmail script. but as you say, the form is editable in contact.tpl - so it should just be a case of adding the new field and changing the post from contact.php to either a local or third-party hosted script... that should also allow you to modify the output to the emails too. 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted February 3, 2016 Share Posted February 3, 2016 Jack, worryingly I had the same thought this morning - great minds think alike... though perhaps i'm more old-school as I was thinking of a php formmail script. Indeed my friend One of my customer's asked me this same question a couple of days ago as they wanted to add a phone number field to the contact form. If it were me I'd also prefer to use a PHP form (I'd create a seperate page and drop the WHMCS contact.php page) but seeing as the PHP has to be separated from the form markup a form builder would be easier seeing as it's usually a case of adding some Javascript to the .tpl file. You do fantastic work on this forum Brian. It's funny because I see a new thread where I think I can add value and get a little excited, as soon as I click on it I generally see that you've already replied in detail and sorted the problem 0 Quote Link to comment Share on other sites More sharing options...
sujithm Posted February 4, 2016 Author Share Posted February 4, 2016 Hello, One option is to add your own contact form to replace the WHMCS one, you could do this by editing your template's contact.tpl file. If you use a service such as Jot Form it'll be easy to build your own contact form. Jack Hi Jack Thanks for your input. I tried to add a new field to contact.tpl, but it is not showing up anywhere in the email received. So I presume that I have to create a new PHP file to which the contact form will be submitted. And in this new PHP file, should accept parameters sent from contact.tpl and send emails using PHP functions. I am trying that option, but due to some other urgent tasks, I have postponed my plans to fix contact form. Will try these possibilities and shall update this thread if my customization work well. Thanks & Regards Sujith 0 Quote Link to comment Share on other sites More sharing options...
zomex Posted February 4, 2016 Share Posted February 4, 2016 Hi Jack Thanks for your input. I tried to add a new field to contact.tpl, but it is not showing up anywhere in the email received. So I presume that I have to create a new PHP file to which the contact form will be submitted. And in this new PHP file, should accept parameters sent from contact.tpl and send emails using PHP functions. I am trying that option, but due to some other urgent tasks, I have postponed my plans to fix contact form. Will try these possibilities and shall update this thread if my customization work well. Thanks & Regards Sujith Yes correct it won't work as you also would have to set it up in contact.php which is encoded so can't be edited. It's best to create a new page e.g contactus.php and use a custom PHP form. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.