✏️Pre-fill name and email address
In certain sites, you as the website owner would already have access to the user's information such as name and email address. With this guide, you can speed up the reporting process by pre-filling the name and email address fields in the report page.
1. Wait for the button to load
There are many ways to check if an element has loaded, but the easiest way to do so would be to check for our global variable isUserHelpReady
. Below is an example of how you can do so with Javascript:
2. Send the user data to the button
After checking to see if the button has loaded, you can then the user data by running these two global functions through the window
interface:
Function | Definition |
---|---|
window.UserHelpSetName(name) | Pre-fill the name field with the parameter |
window.UserHelpSetName(name) | Pre-fill the email field with the parameter |
Below is an example using Javascript:
Last updated