<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.7.2" -->
<rss version="2.0">
    <channel>
        <title>fieldgroup_template[ Search for &quot;&quot;]</title>
        <description></description>
        <link>http://xataface.com/wiki/index.php?-action=single_record_search&amp;-table=wiki&amp;page_id=%3D51&amp;-cursor=0&amp;-skip=0&amp;-limit=30&amp;-mode=list&amp;--subsearch=</link>
        <lastBuildDate>Tue, 21 May 2013 03:48:05 +0100</lastBuildDate>
        <generator>FeedCreator 1.7.2</generator>
        <item>
            <title>fieldgroup_template</title>
            <link>http://www.xataface.com/wiki/fieldgroup_template</link>
            <description>&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Field&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;Page name&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;fieldgroup_template&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;Page id&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;51&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;Page title&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;fieldgroup_template&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;Content&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;
&lt;h2 id=&quot;toc0&quot;&gt;Using a custom template for a field group on the edit form&lt;/h2&gt;
&lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;
&lt;div id=&quot;toc&quot;&gt;&lt;strong&gt;Table of Contents&lt;/strong&gt;
	&lt;div style=&quot;margin-left: 0em;&quot;&gt;&lt;a href=&quot;#toc0&quot;&gt;Using a custom template for a field group on the edit form&lt;/a&gt;&lt;/div&gt;
	&lt;div style=&quot;margin-left: 1em;&quot;&gt;&lt;a href=&quot;#toc1&quot;&gt;Example&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Xataface allows you to partition your fields into &lt;em&gt;groups&lt;/em&gt; so that similar fields are grouped together on the edit form.  The default layout of the fields remains simply vertical, but you can customize this layout (on a per-group basis) by creating a custom template and then assigning this template to the field group with the &lt;em&gt;template&lt;/em&gt; directive.&lt;/p&gt;


&lt;h3 id=&quot;toc1&quot;&gt;Example&lt;/h3&gt;
&lt;p&gt;For example, in your &lt;a href=&quot;/wiki/fields.ini_file&quot;&gt;fields.ini file&lt;/a&gt; if you wanted to group your address fields together you might have: 
&lt;pre&gt;&lt;code&gt;[fieldgroup:address]
    label=&amp;quot;Address Information&amp;quot;
    template=&amp;quot;AddressInformationGroup.html&amp;quot;

[address_1]
    group=address

[city]
    group=address

[state]
    group=address&lt;/code&gt;&lt;/pre&gt;

&lt;/p&gt;

&lt;p&gt;Then you would add the a template named &lt;em&gt;AddressInformationGroup.html&lt;/em&gt; to your application's &lt;em&gt;templates&lt;/em&gt; directory to display how the fields are laid out: 
&lt;pre&gt;&lt;code&gt;&amp;lt;table width=&amp;quot;100%&amp;quot;&amp;gt;
    &amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Address 1:&amp;lt;/th&amp;gt;
    &amp;lt;td&amp;gt;{$elements.address_1.html}&amp;lt;/td&amp;gt;

    &amp;lt;th&amp;gt;City:&amp;lt;/th&amp;gt;
    &amp;lt;td&amp;gt;{$elements.city.html}&amp;lt;/td&amp;gt;

    &amp;lt;th&amp;gt;State:&amp;lt;/th&amp;gt;
    &amp;lt;td&amp;gt;{$elements.state.html}&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;&lt;/code&gt;&lt;/pre&gt;

 This would display all of the fields in this group in a single row (horizontally) instead of vertically.&lt;/p&gt;

&lt;p&gt;Note that this is an over-simplified example that doesn't take account for display error messages, required notices, grouped fields, and other information that you can obtain from the {$elements} array.&lt;/p&gt;

&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot;&gt;Language&lt;/td&gt;&lt;td valign=&quot;top&quot;&gt;en&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</description>
            <author>fieldgroup_template</author>
        </item>
    </channel>
</rss>
