Nesting layouts in form-layout problem

Hi all, i’m trying to nest a layout, a vbox in the specific case, in a form-layout in this way

2023-11-10 09_30_49-Window

but as final result textfields contained in vbox lose label caption.

PS i tried out other container components such as hbox div and so on

Thank’s in advance

Hello,

When specifying additional layouts in formLayout, the label is not added. But you can add the label yourself.

For example:

<formLayout id="form" width="500px" dataContainer="userDc" labelsPosition="TOP">
            <textField id="usernameField" property="username" readOnly="true"/>
            <passwordField id="passwordField"
                           label="msg://com.company.jmixcaptionform.entity/User.password"
                           required="true"
                           visible="false"/>
            <passwordField id="confirmPasswordField"
                           label="msg://confirmPassword"
                           required="true"
                           visible="false"/>
            <hbox width="100%">
                <textField id="firstNameField"
                           label="msg://com.company.jmixcaptionform.entity/User.firstName"
                           property="firstName"
                           width="50%"/>
                <textField id="lastNameField"
                           label="msg://com.company.jmixcaptionform.entity/User.lastName"
                           property="lastName"
                           width="50%"/>
            </hbox>
            <textField id="emailField" property="email"/>
            <comboBox id="timeZoneField" property="timeZoneId"/>
            <checkbox id="activeField" property="active"/>
        </formLayout>

Result:
image

Regards,
Nikita

1 Like