On Sat, Mar 19, 2011 at 5:23 AM, herb <[email protected]> wrote:
> I'm using sprox to build a form where I have lots of fields.  I would
> like to display those fields in two columns:
>
> label1 field1            label4 field4
>
> label2 field2            label5 field5
>
> label3 field3            label 6 field6
>
> Is there any simple way to do it?
>

Uhm, I can't think of any quick way to do this apart using some CSS to
change positioning.

> Also, what is the best way to change the text in the label?  Finally,
> can you give me an example where I over-ride Sprox's choice of field
> type and change its attributes?
>

This is quite simple, you can put inside your form definition a field
with the same id of the field that you want to override.
This form for example overrides the "zone" field:

class EditSliceForm(EditableForm):
    __model__ = Slice
    __omit_fields__ = ['view_uid', 'content_uid', 'page_uid', 'view',
'slice_order', 'content']
    __hide_fields__ = ['uid']
    __field_order__ = ['uid']
    __dropdown_field_names__ = {'page' : 'title'}
    zone = SingleSelectField('zone', options=zip(acr_zones, acr_zones))

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

Reply via email to