On Mar 28, 2007, at 2:26 PM, Chris Shenton wrote:

>
> I use validators and with most of my fields I can use
>
>   self.form_result['fieldname']
>
> to get the value.  But this does NOT give me multiple values (e.g., a
> list) form a multi-select field, it only gives me one.  So I have  
> to do:
>
>   request.params.getall('role_id')
>
> to get all my roles in the form above.
>
> Seems silly to have to use a different variable for multivalued
> results than single-valued. Perhaps I am missing something?
>

FormEncode creates that form_result dictionary. Obviously it's not  
doing any special handling of MultiDicts. Does FormEncode handle  
multiple values in MultiDicts correctly during validation?

Maybe the validate decorator needs to pass formencode  
request.params.mixed() and then create a MultiDict from the results  
for form_result.

--
Philip Jenvey



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to