Ht872 Posted June 12, 2017 Share Posted June 12, 2017 Is there a way to display a CMS thank you page after the user submits the contact-form? At the moment the user is presented with a fairly basic message that reads "Your message has been successfully sent to our team" in contact-form.tpl in the default-bootstrap theme. It would be good so that instead of this the user is taken to a separate CMS page that can be used to track properly on Google Analytics. Thanks. Link to comment Share on other sites More sharing options...
musicmaster Posted June 12, 2017 Share Posted June 12, 2017 It is in contact-form.tpl in your theme. You can adapt that file. Link to comment Share on other sites More sharing options...
Ht872 Posted June 16, 2017 Author Share Posted June 16, 2017 It is in contact-form.tpl in your theme. You can adapt that file. Thanks. I have been looking in there but not sure the best way to do this. Ideally I'd like the contact form to simply forward to a CMS page. If you'd be able to explain how to do this it would be a huge help as I don't have much experience when it comes to editing .tpl files. Thanks again. Link to comment Share on other sites More sharing options...
musicmaster Posted June 17, 2017 Share Posted June 17, 2017 In Contact-form.tpl you will find something like {if isset($confirmation)} <p class="alert alert-success">{l s='Your message has been successfully sent to our team.'}</p> <ul class="footer_links clearfix"> <li> <a class="btn btn-default button button-small" href="{$base_dir}"> <span> <i class="icon-chevron-left"></i>{l s='Home'} </span> </a> </li> </ul> {elseif isset($alreadySent)} You should replace that with something like {if isset($confirmation)} <script>location.href="http://www.myshop.com/mybeautifulcmspage";</script> {elseif isset($alreadySent)} It is not really an elegant solution but it should work. 1 Link to comment Share on other sites More sharing options...
Ht872 Posted June 19, 2017 Author Share Posted June 19, 2017 Perfect, thank you very much for the help, that seems to do the job nicely. Link to comment Share on other sites More sharing options...
fibo Posted July 3, 2017 Share Posted July 3, 2017 Thank you musicmaster for your solution! Link to comment Share on other sites More sharing options...
musicmaster Posted July 4, 2017 Share Posted July 4, 2017 On further though it might be better to use the following code: {if isset($confirmation)} <script>location.href="http://www.myshop.com/mybeautifulcmspage";</script> <p class="alert alert-success">{l s='Your message has been successfully sent to our team.'}</p> <ul class="footer_links clearfix"> <li> <a class="btn btn-default button button-small" href="{$base_dir}"> <span> <i class="icon-chevron-left"></i>{l s='Home'} </span> </a> </li> </ul> {elseif isset($alreadySent) I will still bring you to the new page. But when for some reason Javascript doesn't work on your page it will display the traditional message. 1 Link to comment Share on other sites More sharing options...
Ht872 Posted July 7, 2017 Author Share Posted July 7, 2017 Great thank you, have updated my code to the new version. Cheers Link to comment Share on other sites More sharing options...
Rizzzle Posted March 4, 2022 Share Posted March 4, 2022 Hi, Does anyone have a solution to 1.7? I'd like to edit the contact form confirmation message? Thanks Link to comment Share on other sites More sharing options...
Ress Posted March 10, 2022 Share Posted March 10, 2022 First search in: \themes\active_theme\modules\contactform\views\templates\widget\contactform.tpl If you do not find the file in the theme, directly in the module: \modules\contactform\views\templates\widget\contactform.tpl Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now