Form colspan attribute

Hi everyone,
I have a form with 2 columns. I need to span a field (email field in the sample) to second column,
How can i do it? With colspan="2" attribute it doesn’t works.

    <form id="form" dataContainer="personDc">
        <column width="250px">
            <textField id="idCardField" property="idCard"/>
            <textField id="emailField" property="email" colspan="2"/>
        </column>
        <column width="250px">
            <textField id="nameField" property="name"/>
        </column>
    </form>

Above code doesn’t works. I need like this (edited image):
personeditor

Sample project:
FormSample.zip (391.5 KB)

Thanks.

Hi,

Currently, the Form component doesn’t support colspan/rowspan functionality, but we have plans to add it (see related issue).

For now, you can implement the desired layout using the GridLayout component (see online demo).

Hint: In screen XML-descriptors, component attributes for displaying static text (such as label value) can address localized messages using the rules of MessageTools.loadString() method. For example:

  • value="msg://com.company.sample.entity/Role.name" – gets a message defined by the Role.name key in the com.company.sample.entity message pack.

This can be handy when defining a label value that will be used as a field caption.

Regards,
Gleb

1 Like

Ok thanks! I hope the feature is released soon.

Hi Gleb,

Does this work now on version 7.1 ? I tried to use Form container with two columns and making the first field of the first span 2 or 4 columns. So it still doesn’t work. Could you please confirm ?

Thanks
Samy

Hi,

The linked issue is planned for 7.2 release.

Gleb

2 Likes

Hi @gorelov, regarding the aforementioned issue, could you please share your plans on how to implement the grid-like attributes, especially in regard with my PR #2465 that’s pending your approval (see the last comment)?

Thx for your time,
Paolo