Quick way to do customized form layout

A place for users and developers of the Xataface to discuss and receive support.

Quick way to do customized form layout

Postby rleyba » Thu Mar 31, 2011 3:01 am

Hi Steve,

The form we need to create requires a lot of fields and it is not practical to use the default layout where all the fields line up vertically (making the user scroll down unnecessarily). I just did a site search of your site and I saw some hits but they are 4-5 years old.

http://xataface.com/forum/viewtopic.php?t=4126#20712
http://xataface.com/forum/viewtopic.php?t=3826#19110

Do you have perhaps have some new tutorials, tips, tricks or templates that can show how this can be done easily?

Thanks and regards,
Last edited by rleyba on Sun Apr 03, 2011 6:49 am, edited 1 time in total.
rleyba
 
Posts: 53
Joined: Sat Dec 04, 2010 3:50 pm

Re: Quick way to do customized form layout

Postby shannah » Fri Apr 01, 2011 7:40 pm

I don't think I have any tutorials on this particular thing, though there's lots that could be written.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Quick way to do customized form layout

Postby cantlep » Fri Apr 08, 2011 6:21 am

Hiya, Have you thought about breaking the page up into relevant sections and using tabs? I had the same issue with loads of fields needing to be filled out and it made the page look messy. I broke the page up using tabs and that works better.

e.g in tablename/fields.ini

Code: Select all
[tab:__main__]
label = "Main Details"

[tab:1]
label = "Foo Section"

[tab:2]
label = " Bar Section"

[tab:3]
label = "Other Section"

[field1]
widget:label = "This is field 1"
tab = 1
visibility:list = hidden
visibility:browse = hidden

[Field2]
widget:label = "Weights"
transient = 1
relationship = whatever
widget:type = grid
widget:columns = "BodyPart,Exercise,SetNumber,RepNumber,Weight"
tab = 1
validators:required = true

[Field3]
widget:label = "stuff"
transient = 1
relationship = whatever
tab = 2


And so on

I have also done some work with templates to change the layout of a page but I did find a few issues that I never really got round to resolving (particularly with plone.css not being honoured correctly)

Anyhow - here is the post, viewtopic.php?f=4&t=5531

There is an example template for having fields display horizontally rather than vertically.

Hope that's of some help.

Paul
cantlep
 
Posts: 172
Joined: Fri Mar 05, 2010 2:14 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 17 guests

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