AnsweredAssumed Answered

Auto-Focus HTML field within a Web Viewer

Question asked by littleluce on Apr 12, 2018
Latest reply on Apr 12, 2018 by littleluce

I've been working on implementing some web viewers in a solution based on some examples I found at Soliant: Web Viewer Integrations Library - Soliant Consulting

 

I'd like to be able to have a field in the web viewer automatically come into focus when the web viewer loads. Due to the nature of some of these integrations, I have to stick the web viewer inside of a popover, meaning users currently have to click twice in order to start typing.

 

I've tried a couple of JavaScript functions such as

autofocus="autofocus" in the input tag field

and

$(document).on('load', function(){

   $('.myField').click();

});

...and these work in a web browser, but not FileMaker. Any ideas?

Outcomes