Templates and Forms

A place to discuss development of the Xataface core.

Templates and Forms

Postby shardison » Sat Sep 01, 2012 9:19 am

Steve,

I have been spending a fair amount of time trying to understand how to control the layout of fields under the tabs. I would really like to create a html_report like form where I can control how all the fields appear to a user when viewing and editing records on a per table or per relationship basis. I would like to add buttons to perform some basic tasks. I have spent time with the smarty templates but there are many nested templates and function calls inside of each template that I get lost trying to find the right template to create in order over-ride the default. Additionally, I want an override for a particular table not for all tables i may use. Clearly, my inexperience is not helping me.

Should I override Dataface_View_Record.html, Dataface_Edit_Record.html, Dataface_FindForm.html for each of my tables/relationships?

How can I make calls to fields directly/individually so I can control where they end up on my html template?

Is everything between the {...} a function call that is in a php document somewhere? if so where and can I add my own functions there?

Also can you answer my date format question in html reports that I posted a couple of days ago

Please be patient and thank you very much in advance.
shardison
 
Posts: 24
Joined: Wed Aug 08, 2012 12:09 pm

Re: Templates and Forms

Postby shardison » Sun Sep 02, 2012 11:46 am

After several hours looking through forums and wiki and and the Dataface files my immediate desire is to override the html output that is derived from {$form} in the Dataface_Edit_Record.html. The data is ok and the collapsable sections I defined are fine. I really want to control the styling of the form. I hope being more specific is of use answering my question from above. Thanks
shardison
 
Posts: 24
Joined: Wed Aug 08, 2012 12:09 pm

Re: Templates and Forms

Postby shannah » Tue Sep 04, 2012 1:07 pm

This topic requires more than I can put into a short forum post.
One method to sort of achieve what you want is via the fieldgroup's template directive:

http://xataface.com/wiki/fieldgroup_template

This only applies to the edit form, not the find form.

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Developers

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved