/
tabs.xml
executable file
·59 lines (57 loc) · 2.46 KB
/
tabs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?xml version="1.0" encoding="UTF-8"?>
<i:view xmlns:i="http://www.appflower.com/schema/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="edit" xsi:schemaLocation="http://www.appflower.com/schema/appflower.xsd">
<i:title><![CDATA[Form with Tabs]]></i:title>
<i:datasource type="orm">
<i:class>productPeer</i:class>
<i:method name="retrieveByPk">
<i:param name="id">{id}</i:param>
</i:method>
</i:datasource>
<i:fields url="forms/tabs?id={id}" multipart="true">
<i:field label="Name" name="name" type="input">
<i:validator name="sfValidatorString">
<i:param name="required">true</i:param>
<i:param name="max_length">255</i:param>
</i:validator>
<i:value type="orm">
<i:source name="getName" />
</i:value>
</i:field>
<i:field label="Price" name="price" type="input">
<i:validator name="immValidatorNumber">
<i:param name="required">true</i:param>
</i:validator>
<i:value type="orm">
<i:source name="getPrice" />
</i:value>
</i:field>
<i:field label="Quantity" name="quantity" type="input">
<i:validator name="sfValidatorInteger">
<i:param name="required">true</i:param>
</i:validator>
<i:value type="orm">
<i:source name="getQuantity" />
</i:value>
</i:field>
<i:field name="static_image" label="" type="static">
<i:value type="orm">
<i:source name="getHtmlImage" />
</i:value>
</i:field>
<i:field label="Image" name="image" type="file">
</i:field>
</i:fields>
<i:description><![CDATA[This is an example of form field grouping. The form implements two field-sets, and renders them as tabs.
This allows easy navigation and makes the form well organized. This also an example of file uploads (see the second tab). <br><a href="/studio#widget#frontend/forms/tabs" target="_blank">Open in Studio</a>]]></i:description>
<i:grouping>
<i:set title="Product Information" tabtitle="Product Information">
<i:ref to="name"/>
<i:ref to="price"/>
<i:ref to="quantity"/>
</i:set>
<i:set title="Product Image" tabtitle="Product Image">
<i:ref to="static_image"/>
<i:ref to="image"/>
</i:set>
</i:grouping>
</i:view>