Le 12/04/12 10:27, Chris McDonough a écrit :
> On Thu, 2012-04-12 at 09:42 +0200, Damien Baty wrote:
>> I would like Peppercorn or Deform to ignore some HTML fields when 
>> validating a form. [...]
> 
> Have the deserialize() of the widget strip the unnecessary field
> data out of the cstruct it returns.  See deform's CheckedInputWidget
> for an example.

Indeed. I tried to tweak the 'deserialize()' but that did not work at
first. Looking at the template of CheckInputWidget, I saw that it tricks
Peppercorn by enclosing HTML fields in the following Peppercorn marker
fields:

--- 8< ---
<input type="hidden" name="__start__" value="${field.name}:mapping"/>
[...]
<input type="hidden" name="__end__" value="${field.name}:mapping"/>
--- 8< ---

Thanks for the pointer!

-- 
Damien Baty

-- 
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