The operators
| Operator | Reaches into | Example |
|---|---|---|
ifr>> | An iframe from the same domain | #desc_ifr ifr>> #tinymce |
sr>> | An element’s shadow root | my-form sr>> textarea[name=q] |
Set up
Write the selector
Inspect the field. If it sits under a
#shadow-root, the host is the element just above it. If it sits inside an <iframe>, the host is the iframe. Join the host’s selector and the field’s selector with the operator, and enter it on the Form wiring tab.Turn on rich-text conversion
If the field holds HTML, turn on Question field is a rich-text editor (
data-main-input-formats-html="true") so the question is sent as text. An editable element (contenteditable) is always sent as text.Check the match
Add
data-debug-mode="true" to the script tag. The console logs attached once the form and question field are found. It also names an anchor, button label, ticket-submitted element or hand-off target it couldn’t find. To test a selector in the browser console, check each half separately, since the operators only work inside the deflector:Plain fields
No operator is needed for these:- A single word such as
descriptionis tried as a CSS selector, then as[name="description"], then as#description. - A dropdown sends the label the reader sees, not its value.
- A checkbox or radio button sends its value when checked, and nothing when not.
- A submit button outside its
<form>still finds the form it belongs to.
Don’t use a rich-text editor as the hand-off target. It can overwrite what the deflector wrote. Use a hidden field.