Making Asynchronous (AJAX / Fetch API) Requests Within A Form

Hi all,

I have a form and I would like to look up a value on a remote server using HTTP GET. I’m a total XHR/AJAX rookie but I can learn. While I can work my way through getting that part to work on its own, how would I bring this into a Gravity Form? Can I call custom JS within a form somewhere?

More specifically, I would like for a user to input two fields and then click a button. That button would do the request and the result would get filled in on another field on the form. Any direction on this would be appreciated.