Re: formfill strips all values

Ian Bicking <[email protected]> Tue, 16 Sep 2008 12:49:06 -0500
Newsgroups gmane.comp.python.formencode
Message-ID <[email protected]>
Przemyslaw Wrzos wrote:
> I’ve just encountered an issue where formfill() strips the values of 
> fields for which I do not provide any values in the defaults parameter 
> (specifically for a checkbox in my case). Is this behaviour 
> intentionally like that by design? Do I have any options to get around 
> that? If not perhaps it would be a good idea to change this behaviour by 
> default or at least provide an option which would allow it to change.

I don't see a way to distinguish between unset values in the values sent 
to render, and actual values that are empty.  For instance, an unchecked 
checkbox is just no value at all.

Can you put the defaults into the dictionary you pass into render?

-- 
Ian Bicking : [email protected] : http://blog.ianbicking.org

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/