Quick way to do customized form layout
Archived from the Xataface Users forum.
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,
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.
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