How do I change field positions in a form?

0 views
Skip to first unread message

Ed Valentine

unread,
Dec 28, 2009, 3:04:36 PM12/28/09
to TurboGears
I have have not been able to find a single example of exact
positioning fields in TG2. I want to setup a form like:

First Name: _________________ MI _ Last Name
______________________
Address: ____________________________________ City:
______________________ State: __
(Check Box) Shipping Address:
.
.
.

I have tried to use CSS and the ID of the specific field but it is not
working.
Please point me to any documentation or examples using the current
level of TG.

Thanks for any suggestions.

Diez B. Roggisch

unread,
Dec 28, 2009, 8:11:08 PM12/28/09
to turbo...@googlegroups.com
If you need full customization, define your own template. Take a look
at the TW forms templates to see how to properly invoke child widgets.
Also remember that you can use "display_child" with a name as well as
an index.

Diez

> --
>
> You received this message because you are subscribed to the Google
> Groups "TurboGears" group.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to turbogears+...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
> .
>
>

Ed Valentine

unread,
Dec 28, 2009, 11:41:35 PM12/28/09
to TurboGears

I have been working with doing a specific CSS file for the page. I can
set parameters for the input fields using the ID as in;

#(field id as shown in Firebug)
color:red;
position: absolute; left:50%
}

but this does not seem to work for the label. I just want the fields
in the same order but across the page, not all on the left side.

Suggestions?

Christoph Zwerschke

unread,
Jan 1, 2010, 3:05:20 PM1/1/10
to turbo...@googlegroups.com
Am 29.12.2009 05:41 schrieb Ed Valentine:
> I just want the fields in the same order but across the page, not all
> on the left side. Suggestions?

Have a look at http://docs.turbogears.org/1.0/RoughDocs/NicerForms
The recipes are for TG1 + TG widgets, but you can do the same with TG2 +
ToscaWidgets.

-- Christoph

Reply all
Reply to author
Forward
0 new messages