How to move to an empty field to be ready for user input?

56 views
Skip to first unread message

Chris Green

unread,
Jan 9, 2022, 11:19:58 AM1/9/22
to chrome-...@googlegroups.com
I have just installed Autofill to use with Vivaldi on xubuntu Linux.
I'm really impressed so far, good documentation, I've already managed
to get some simple forms autofilled and there's a Google group for
supoort - so thank you! :-)

Now to my question, I have a form where the last field to fill in has
to be filled manually because it's generated by a security device. Is
there a way to move the cursor to that field automatically using
Autofill once it has filled the other fields?

--
Chris Green

Autofill Extension

unread,
Jan 10, 2022, 3:24:37 PM1/10/22
to Autofill Extension
Yes, you can do anything you can dream up by using a JavaScript rule. If you provide the code for this input box, I can provide you with the JavaScript rule.

Chris Green

unread,
Jan 10, 2022, 4:01:32 PM1/10/22
to chrome-...@googlegroups.com
On Mon, Jan 10, 2022 at 12:24:37PM -0800, Autofill Extension wrote:
> On Sunday, January 9, 2022 at 8:19:58 AM UTC-8 c...@isbd.net wrote:
> >
> > I have just installed Autofill to use with Vivaldi on xubuntu Linux.
> > I'm really impressed so far, good documentation, I've already
> > managed
> > to get some simple forms autofilled and there's a Google group for
> > supoort - so thank you! :-)
> > Now to my question, I have a form where the last field to fill in
> > has
> > to be filled manually because it's generated by a security device.
> > Is
> > there a way to move the cursor to that field automatically using
> > Autofill once it has filled the other fields?
> >
> Yes, you can do anything you can dream up by using a JavaScript rule.
> If you provide the code for this input box, I can provide you with the
> JavaScript rule.

Here's the code:-


<div class="textInput">
<input type="password" id="idv_OtpCredential" name="idv_OtpCredential" data-dojo-props="required: true,successMessage:'Confirmed',
invalidInputMessage:'The security code must be between 5 and 8 numbers only. Please try again.',
minmaxMessage:'The security code must be between 5 and 8 numbers only. Please try again.',
regEx:'^[A-Za-z0-9]*$',
minLen:'5',
maxLen:'8',
missingMessage:'Please complete this field'">
</div>

I just want to move the cursor into the field ready for entry of the 'security code'.

--
Chris Green

Autofill Extension

unread,
Jan 10, 2022, 9:08:42 PM1/10/22
to Autofill Extension
Here's a JavaScript rule to automatically focus the password field:

let elPassword = document.getElementById('idv_OtpCredential');
if (elPassword) {
  elPassword.focus();

Chris Green

unread,
Jan 11, 2022, 6:34:02 AM1/11/22
to chrome-...@googlegroups.com
On Mon, Jan 10, 2022 at 06:08:41PM -0800, Autofill Extension wrote:
> Here's a JavaScript rule to automatically focus the password field:
>
> let elPassword = document.getElementById('idv_OtpCredential');
>
> if (elPassword) {
>
> elPassword.focus();
>
> }
>
Yes, thank you, that worked too. It does need a very specific value
in the Site column to make sure it only acts when required, that was
the most difficult bit, escaping ? and such.

--
Chris Green

Autofill Extension

unread,
Jan 11, 2022, 8:05:06 PM1/11/22
to Autofill Extension
You're welcome. If you hover the mouse over the "?" in the column header, you will see a list of regex reserved characters that you'd need to escape. Regex is really fun & powerful when you master it.

Chris Green

unread,
Jan 12, 2022, 4:10:12 AM1/12/22
to chrome-...@googlegroups.com
On Tue, Jan 11, 2022 at 05:05:06PM -0800, Autofill Extension wrote:
> You're welcome. If you hover the mouse over the "?" in the column
> header, you will see a list of regex reserved characters that you'd
> need to escape. Regex is really fun & powerful when you master it.
>
I'm not an RE expert exactly but I have been using them since
somewhere back in the late 1970s or early 1980s. :-) Yes, they are a
'good thing' to know about.


--
Chris Green
Reply all
Reply to author
Forward
0 new messages