Expand my Community achievements bar.

Check out the 3rd Edition of the AEP Community Lens for all the latest releases, resources, and Community updates
SOLVED

Keypress event rule not working

Avatar

Level 4

Hi,

I want to fire an event based rule if anyone clicks on the Enter key(keyboard) to get the search results. Anyone successfully created event based rule with keypress "event type". I tried muliple options but rule is not working. Can someone help me on this. Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Level 4

This snippet just worked for me

if (event.keyCode == 13){ return true; }

Since your event is on #search I don't think you need to reference #search again in the Custom Condition for something like this

0 Replies

Avatar

Correct answer by
Level 4

This snippet just worked for me

if (event.keyCode == 13){ return true; }

Since your event is on #search I don't think you need to reference #search again in the Custom Condition for something like this

Avatar

Level 9

spectaprod wrote...

This snippet just worked for me

  1. if (event.keyCode == 13){
  2. return true;
  3. }

Since your event is on #search I don't think you need to reference #search again in the Custom Condition for something like this

 

 

Thanks for the quick reply!

-Tacia

page footer