Twitter Feed

Xataface Maillist

Sign up to receive the Xataface news letter with weekly updates and development tips.

Found 1 of 138 records in table Wiki
Now Showing 1 of 1

Current Record: fieldgroup_template



Using a custom template for a field group on the edit form

Xataface allows you to partition your fields into groups 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 template directive.


For example, in your fields.ini file if you wanted to group your address fields together you might have:

    label="Address Information"




Then you would add the a template named AddressInformationGroup.html to your application's templates directory to display how the fields are laid out:

<table width="100%">
    <tr><th>Address 1:</th>


This would display all of the fields in this group in a single row (horizontally) instead of vertically.

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.

blog comments powered by Disqus
Powered by Xataface
(c) 2005-2019 All rights reserved