0

I'm on version 2016, if that matters.

I have a javascript function that I need called every time a field on the form gains focus.

My end goal is to make it so if a lookup field gains focus, the text is auto-highlighted so there's no need to click it again before editing.

I just need to know how to get a function called each time a field gains focus on the form and can take it from there. Thanks.

Mike
  • 961
  • 6
  • 19
  • 43
  • 1
    There's definitely no supported way to do it. You could use jQuery to attach focus events to lookup controls, but you're probably going to have a really hard time with it because of the way 2016 forms don't display input fields until they gain focus. Also, it would be unsupported and could break with any update. – Polshgiant Apr 19 '16 at 22:56
  • 1
    Why do something upon the actual field gaining focus? – Daryl Apr 22 '16 at 00:13
  • How would I attach a focus event to a lookup control? Not sure how to reference the lookup in jQuery since I'm only used to referencing HTML tags/classes... – Mike Apr 28 '16 at 19:44
  • Nevermind, opened up F12 console log thing and found the classes/IDs/etc of the fields on the form. Am using those in my jQuery click function. Thanks. – Mike Apr 28 '16 at 20:20

0 Answers0