Show Request Form as Default Page
AnsweredI have one Help Center which really is just a place to host a ticket form. Is there any easy way to automatically redirect a visitor to the help center to the submit a request page?
-
Please add the below code at the bottom of your script.js file and replace the text "yourdomain" with the domain of your help center.
$(document).ready(function(){
if(window.location.href == 'https://yourdomain/hc/en-us') {
console.log("kjk");
window.location.href = '/hc/en-us/requests/new';
}
});Let me know if you need further assistance
Thanks
Pulkit
-
Thanks Pulkit Pandey. I have added the code with my domain but when I goto the site in a private browser it doesn't redirect and stays on the home page, any thoughts?
-
Hi Graham Ferguson
I will check it for same and let you know
Thanks
Pulkit -
Hi Graham Ferguson
As I have check that the redirection is working fine on the Browser private window also.
Can you please share the code which you are using after the updation of your domain
Thanks
Pulkit -
Pulkit Pandey here is the code in the script.js file:
-
As I go through your help center URL found that the following CDN is missing, Please add the Jquery CDN in the document.head.hbs file as shown in the below screenshot
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
Let me know if it solves your issue
Thanks
Pulkit
-
Thank you so much Pulkit Pandey it's working perfectly now!
Please sign in to leave a comment.
7 Comments