Recent searches
No recent searches
Editing a form's URL
Answered
Posted May 11, 2023
How can I edit the URL of one of my forms? It would be nice to edit the whole URL, but ultimately I just need to add a word to the end of the URL.
Current: https://___.zendesk.com/hc/en-us/requests/new?ticket_form_id=#######
Needed: https://___.zendesk.com/hc/en-us/requests/new?ticket_form_id=#######_newword
0
8
8 comments
Ifra Saqlain
Hi Amy :)
Add this code at the bottom of script.js file:
Note: Remove google.com
from the code
setAttribute("data-url", "google.com");
and add your URL which you want like this
https://xyz.zendesk.com/hc/en-us/requests/new?ticket_form_id=#######__newword
Remove this URL
https://xyz.zendesk.com/hc/en-us/requests/new?ticket_form_id=#######
From the code
("option[data-url='https://xyz.zendesk.com/hc/en-us/requests/new?ticket_form_id=#######']")
and add your form URL which you wanna update
Thanks
0
Amy Giella
Hi Ifra,
Thanks so much for the quick reply. I did this, but that URL now takes me to the "Submit a request" screen with the dropdown to select which form to fill out. Even when I click on the form with the edited URL, I am looped back to this page and cannot fill out the form. Is there a way for the URL to go directly to the form itself?
0
Ifra Saqlain
I know because you can't edit the original URL which comes from backend. If you edit the original url it will create bug. You asked that's why I shared the trick.
0
Amy Giella
If I understand this correctly, you're saying it's possible to change the original URL with the code you initially provided, but it introduces a bug and there is no fix for the bug. So this would not be a workable solution.
0
Ifra Saqlain
@Amy Giella, actually the URLs in the helpcenter come from backend I means URLs defined by the developers, On my behalf you can't change the default URLs.
0
Sebastian Carvajal Correa
Amy Giella hello,
I have had the same need this week to modify the URL for UX issues, I did it with the following script:
Since we are modifying the user's browsing history, you must take into account that this is not an existing URL, so if the user tries to search for it directly, he will get an error not found, so I suggest you handle this error.
I hope my idea helps you.
1
Amy Giella
Thanks so much, Sebastian! This got us a step closer to where we need to be.
1
Ifra Saqlain
Thanks for sharing the trick @Sebastian :)
0