#8720: MultipleHiddenInput doesn't give list of elements in clean method
-------------------------------------------------+--------------------------
          Reporter:  [EMAIL PROTECTED]  |         Owner:  nobody
            Status:  reopened                    |     Milestone:  1.0   
         Component:  Forms                       |       Version:  SVN   
        Resolution:                              |      Keywords:        
             Stage:  Unreviewed                  |     Has_patch:  0     
        Needs_docs:  0                           |   Needs_tests:  0     
Needs_better_patch:  0                           |  
-------------------------------------------------+--------------------------
Changes (by kyjv):

  * status:  closed => reopened
  * resolution:  worksforme =>

Comment:

 Ok, I set up a test project with recent django(r8955).
 It has a simple view that renders a form with four hidden inout fields
 with the name testfield.
 When submitted, the values will be sent back to the view and form.is_valid
 is called. The form looks like this:

 {{{
 from django import forms

 class TestForm(forms.Form):
     testfield = forms.CharField(required=False,
 widget=forms.MultipleHiddenInput())

     def clean_testfield(self):
         print self.cleaned_data.get('testfield')
         print self.cleaned_data.get('testfield')[0]
         return self.cleaned_data.get('testfield')
 }}}

 This will print [u'1', u'2', u'3', u'4'] and the character [

 I expected it to give me u'1' when I access it as a list (like a list of
 unicode characters should behave)

 If I'm just doing something wrong, please tell me.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8720#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to