Hi all,
I'm just starting with TG (2.1b2) and have gotten a basic form working
but I can't figure out if the SingleSelectField supports the
"selected" attribute.  I've snipped out some of my code (this is when
I was playing with attrs and container_attrs, neither of which
worked):

class ContactInfoForm(TableForm):
    states = webhelpers.constants.us_states()

    fields = [SingleSelectField('state', label_text = 'State:*  ',
options = states, container_attrs = {'selected':'CA'}, validator =
String())]

I'm trying to have the default be California when the form loads.


A couple of other related questions...  Is it considered appropriate
to cross post something like this to the TW group as well?  I started
here since TG is the highest level and I'm not sure yet of all the
interactions.  Also, if "selected" is supported, how should I have
figured it out?  I looked at some of the source files using the Trac
interface on the TW site but wasn't able to puzzle it out (relatively
new to Python too); I did look at the TW site docs...

Thanks for your time,
Eric
PS It would be nice if somebody could get Elixir back in sync with TG

-- 
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