Custom JmixLoginForm

Hi Support,

I want to custom JmixLoginForm to modify the javascript of jmix-login-form.js to enforce Username to always Uppercase

How can I do that ?

Regard,
CK

Hi Choon

My login-view.xml looks like the following

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<view xmlns="http://jmix.io/schema/flowui/view" focusComponent="usernameField" title="msg://LoginView.title">
    <layout justifyContent="CENTER" alignItems="CENTER" classNames="jmix-login-main-layout">
        <vbox id="loginFormWrapper" alignItems="CENTER" classNames="login-form-wrapper">

            <h2 id="loginFormTitle" text="msg://loginForm.headerTitle"/>

            <textField id="usernameField" label="msg://loginForm.username" required="true" classNames="login-form-username" requiredMessage="msg://loginForm.username.requiredMessage" width="50%"/>
            <passwordField id="passwordField" label="msg://loginForm.password" required="true" classNames="login-form-password" requiredMessage="msg://loginForm.password.requiredMessage" width="50%"/>

            <hbox id="loginFormSettingsWrapper" expand="rememberMe" alignItems="CENTER" classNames="login-form-settings-wrapper" width="50%">
                <checkbox id="rememberMe" label="msg://loginForm.rememberMe" classNames="login-form-remember-me"/>
                <select id="localeSelect" classNames="login-form-locale-select"/>
            </hbox>

            <div id="errorMessage" classNames="login-form-error-message" visible="false">
                <h5 id="errorMessageTitle" classNames="login-form-error-message-title"/>
                <p id="errorMessageDescription" classNames="login-form-error-message-description"/>
            </div>

            <button id="submitBtn" text="msg://loginForm.submit" themeNames="primary" classNames="login-form-submit" width="50%"/>

            <div id="info"/>
        </vbox>
    </layout>
</view>

This way you can easy adapt the usernameField

image

Let me know, if this is what you are looking for.

Regards
Felix

I want to follow JmixLoginForm to reduce the effort to maintain changes during JMIX patches.

I able to extend JmixLoginForm to implement my logic.

thank you for your suggestion

In this case you might check out this LoginView with regular components instead of LoginForm · Issue #2416 · jmix-framework/jmix · GitHub

Regards
Felix