top of page
Anchor 1

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:

Submit
Wix Code Using Tab to Move to Next Field
bottom of page