Show Request Form as Default Page | Community
Skip to main content

Show Request Form as Default Page

  • October 6, 2022
  • 7 replies
  • 0 views

Graham11

I 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?

7 replies

Pulkit12
  • October 6, 2022

Hi Graham Ferguson

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


Graham11
  • Author
  • October 6, 2022

Thanks @pulkit12. 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?


Pulkit12
  • October 7, 2022

Hi Graham Ferguson

I will check it for same and let you know

Thanks
Pulkit


Pulkit12
  • October 7, 2022

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


Graham11
  • Author
  • October 7, 2022

@pulkit12 here is the code in the script.js file:


Pulkit12
  • October 7, 2022

Hi Graham Ferguson

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


Graham11
  • Author
  • October 7, 2022

Thank you so much @pulkit12 it's working perfectly now!