Thanks I took a look and since I tried to initialize my select widget several different ways while trying the options shown in the initial portion of the forms fields document I was unable to do it successfully, without an actual axample which uses a select widget. I found a way around it anyway though, so not a problem. Thanks for the help.
On Mar 17, 10:02 am, Tom Evans <tevans...@googlemail.com> wrote: > On Thu, Mar 17, 2011 at 2:58 PM, hank23 <hversem...@stchas.edu> wrote: > > Is it possible to specify a default selected option for the > > forms.Select widget of a forms.CharField form field? If so how is it > > coded? Here is my current widget's code from my form definition: > > > widget=forms.Select(attrs={ 'name': 'rptlist', 'id': 'rptlist', > > 'size': '1', 'select-one': 'select-one', 'onchange': > > 'enableReportFields();' }, choices=USER_REPORTS )) > > > Everything else works with it except when I select the 0 (zero) entry > > manually. Then nothing seems to happen, because the 0 seems to be the > > current default selected entry. Thanks for the help. > > http://docs.djangoproject.com/en/1.2/ref/forms/fields/#initial > > Cheers > > Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.