Show Request Form as Default Page

Answered

7 Comments

  • Pulkit Pandey
    Community Moderator

    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

    0
  • Graham Ferguson

    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?

    0
  • Pulkit Pandey
    Community Moderator

    Hi Graham Ferguson

    I will check it for same and let you know

    Thanks
    Pulkit

    0
  • Pulkit Pandey
    Community Moderator

    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

    0
  • Graham Ferguson

    Pulkit Pandey here is the code in the script.js file:

    0
  • Pulkit Pandey
    Community Moderator

    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

    0
  • Graham Ferguson

    Thank you so much Pulkit Pandey it's working perfectly now!

    1

Please sign in to leave a comment.

Powered by Zendesk