htmlfill.render question
Jonathan Vanasco <[email protected]> Wed, 11 Jul 2012 18:48:44 -0400
| Newsgroups | gmane.comp.python.formencode |
|---|---|
| Message-ID | <[email protected]> |
hoping someone can give me a suggestion : I sometimes have two forms displayed on a single page. They're validated separately and submitted to different locations. ( this is under pylons and pyramid ) example: the left side of the screen shows Account Data the right side of the screen has a "change password" and "change email" field If i use htmlfill.render on this page to reprint on an error the following behavior happens: 1) default settings - the validated form looks like i want it to -- there are errors displayed -- the 'invalid' fields are blank -- the 'valid' fields are filled - the non-validated forms are all blank 2) force_defaults=False - the non-validated forms have their default values - the validated form loses all the submitted values does anyone have a suggestion on how i can achieve this: - the non-validated forms have their default values - the validated form has the submitted values & errors/blanks the ideas i have so far are: - push the defaults from the other form into the validated form's defaults - add a kwarg to htmlfill.render that would only allow the form re-writing to affect fields explicitly listed in `defaults` and `errors` it'll probably take me as much time to code either of these solutions. if the community would benefit from the second idea - i'd be happy to write a patch. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/