Customizing Form Layout

From JRapid

(Difference between revisions)
Jump to: navigation, search
(Multiple Rows)
Line 80: Line 80:
[[File:form_layout5.jpg]]
[[File:form_layout5.jpg]]
 +
 +
==Multiple Columns==
 +
 +
<pre class="brush:xml;">
 +
<entity name="MultipleColumns" label="Multiple Columns">
 +
        <column label="Column One">
 +
            <property name="title" label="Title"/>
 +
        </column>
 +
 +
        <column label="Column Two">
 +
            <property name="firstName" label="First name"/>
 +
        </column>
 +
 +
        <column label="Column Three">
 +
            <property name="lastName" label="Last name"/>
 +
        </column>
 +
</entity>
 +
</pre>
 +
 +
[[File:form_layout6.jpg]]
 +
==See also==
==See also==
[[Category:Article]]
[[Category:Article]]

Revision as of 19:17, 6 September 2011

When an entity is created, a form with all the non-hidden properties is generated. These properties are placed in the same order as they are defined in the AML source, one under the other.


<entity name="NoRowsOrColumns" label="Example Form">
        <property name="title" label="Title"/>
        <property name="firstName" label="First name"/>
        <property name="lastName" label="Last name"/>
</entity>


File:form_layout1.jpg

Using the row and column elements, fields on the generated form can be organized with a layout different than the default.

Contents

Row

    <entity name="OneRow" label="One row" >
        <row>
            <property name="title" label="Title"/>
            <property name="firstName" label="First name"/>
            <property name="lastName" label="Last name"/>
        </row>
    </entity>

Note that using the row element changes the labelposition to "top" by default.

File:form_layout2.jpg

Specifying labelposition as left changes this.

<entity name="One Row" label="One row" >
        <row>
            <property name="title" label="Title" labelposition="left"/>
            <property name="firstName" label="First name" labelposition="left"/>
            <property name="lastName" label="Last name" labelposition="left"/>
        </row>
</entity>

File:form_layout3.jpg

Column

Using a single column and specifying the label attribute places an HTML fieldset around the properties it wraps.

<entity name="OneColumn" label="One Column">
        <column label="One Column">
            <property name="title" label="Title"/>
            <property name="firstName" label="First name"/>
            <property name="lastName" label="Last name"/>
        </column>
</entity>

File:form_layout4.jpg

Multiple Rows

<entity name="MultipleRows" label="Multiple Rows" >
        <row>
            <property name="title" label="Title"/>
        </row>
        <row>
            <property name="firstName" label="First name"/>
        </row>
        <row>
            <property name="lastName" label="Last name"/>
        </row>
</entity>

Again, the row element changes the labelposition to "top" by default.

File:form_layout5.jpg

Multiple Columns

<entity name="MultipleColumns" label="Multiple Columns">
        <column label="Column One">
            <property name="title" label="Title"/>
        </column>

        <column label="Column Two">
            <property name="firstName" label="First name"/>
        </column>

        <column label="Column Three">
            <property name="lastName" label="Last name"/>
        </column>
</entity>

File:form_layout6.jpg


See also

Personal tools