- The form appears only after the reader does something, such as opening a tab.
- Some ticket types must always reach a person, such as outages or security reports.
Set up
Turn off attaching on load
Turn off Attach as soon as the page loads on the deflector’s Behaviour tab, or add The deflector still loads its settings. It waits for you to attach it.
data-render-on-load="false" to the script tag:Call render() and unmount()
render()attaches the deflector. It waits for the form and question field to appear, up to Wait for form (10 seconds by default).unmount()removes everything the deflector added, and puts back the submit button’s own label.- Both are safe to call many times.
render()does nothing if the deflector is already attached. render()does nothing until the deflector’s settings have loaded, a moment after the script runs. Call it from a reader’s action, such as a change event, not right after the script tag.
Example: skip urgent ticket types
If the form is on the page at load but your framework rebuilds it right after, you don’t need manual rendering. Set Delay before attaching instead (
data-render-timeout="500").Change the settings from code
attach() sets up a new deflector and replaces the one that is attached:
renderOnLoad: false or turned attaching on load off in the dashboard; then call render(). Options passed here win over the dashboard, but attributes on the script tag are not carried over. Every option is listed on the Behaviour page.