Streaming live at 10am (PST)

Is it possible to fire an interaction when a form field is selected via keyboard?

I want to fire an interaction when a form field is selected. Using a ‘Click’ trigger works fine when users select the field with their mouse, but it does not work when the user tabs through the form with their keyboard.

Any ideas?

Thank you!

Here is my public share link: LINK
(how to access public share link)

What are you trying to trigger?

Hi Alex!

You can see an example here:

When the ‘Business Phone’ field is selected, I want to show a div with text.

(In the link above, clicking the field triggers the demo. Ideally, I would like to change that click interaction into an interaction triggered by selecting the field)

Cool! You actual don’t need any interactions to do this.

You can write some CSS and put it into the head tag for that page. Since a click and and using a tab both cause the input to be focused we can use the focus state and a sibling selector to alter the div.

Make sure to remove the the interaction and set the div height to zero. You won’t be able to see it work until it’s published.

Here is a working example.

Here it is live.

.your-field:focus ~ .your-div {


Brilliant! You saved the day. Thanks, @AlexN

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.