Customizing Form Layout

From JRapid

(Difference between revisions)
Jump to: navigation, search
Line 61: Line 61:
[[File:form_layout4.jpg]]
[[File:form_layout4.jpg]]
 +
==Multiple Rows==
 +
<pre class="brush:xml;">
 +
<entity name="TestRowsAndColumns_003" 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>
 +
</pre>
 +
 +
Again, the row element changes the labelposition to "top" by default.
 +
 +
[[File:form_layout5.jpg]]

Revision as of 19:14, 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="TestRowsAndColumns_003" 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



See also

Personal tools