Wix Tutorial - Using Tab to move to the next input field on a form.

Using Tab to move to the next input field on a custom form doesn't work unless using Wix Code/Corvid.

Elements:

User Input:

  • Name: #name  |  Add onKeyPress event in the Properties Panel

  • Email: #email  |  Add onKeyPress event in the Properties Panel

  • Phone: #phone  |  Add onKeyPress event in the Properties Panel

  • Message: #message

Wix Code:

export function name_keyPress(event) {
    if (event.key === 'Tab') {
        $w("#email").focus();
    }
}

export function email_keyPress(event) {
    if (event.key === 'Tab') {
        $w("#phone").focus();
    }
}

export function phone_keyPress(event) {
    if (event.key === 'Tab') {
        $w("#message").focus();
    }
}

Demo:

Websites designed by WixCreate that use the above Wix Code:

None.

Official Wix Expert & Wix Agency Partner

© 2020 by WIXCreate.com

I  All Rights Reserved  I  info@wixcreate.com  I  202-640-5440

facebook-2.gif