Hi team,
Good day
one of the Freshdesk customers the below things are ask to do.
- To hide the ‘Home’ link/button from the portal.
- The landing page for customers will be the Ticket list page.
- Change the Submit a ticket button text to Submit Request button in the header(Customer portal)
I am using javascript to hide the button and change the button text to submit a ticket to submit a request as of now it ok, working fine. you can see in the below screenshot.
code:
const navEle=document.getElementById("ulEle");
console.log("navEle", navEle);
const btnEle=document.getElementsByClassName("btn fw-secondary-button")
console.log("idEle",btnEle[0])
btnEle[0].innerText="Submit Request"
function hidehome() {
let home = document.getElementById("ulEle");
let allnav = document.querySelectorAll("a[href='/en/support/home']");
console.log("all nav" ,allnav[0], allnav[1])
allnav[1].style.display = "none";
}
hidehome()
When i am adding the redirection redirecting to the ticket listing page everything it resetting, button is showing and button text also changing. you can see in the below screenshot
code:
const navEle=document.getElementById("ulEle");
console.log("navEle", navEle);
const btnEle=document.getElementsByClassName("btn fw-secondary-button")
console.log("idEle",btnEle[0])
btnEle[0].innerText="Submit Request"
function hidehome() {
let home = document.getElementById("ulEle");
let allnav = document.querySelectorAll("a[href='/en/support/home']");
console.log("all nav" ,allnav[0], allnav[1])
allnav[1].style.display = "none";
}
hidehome()
// Redirecting to the ticket listing page
window.location.replace('https://spritlesoftware.freshdesk.com/support/tickets');
could you please explain about this why it is happing, and what is the workaround we can do?
Thanks in advance.