Re: [html-formfu] 'default_empty_value' doesn't work

2008-10-31 Thread Michele Beltrame
Hi Juergen! > Maybe a hint could be added to pod to clarify the behavior of > default_empty_value ... I spoke to other developers and they also > misunderstood it :) I just patched H::F::Element::_Field.pm POD in trunk to better clear this situation. I also adding something regarding it on the

Re: [html-formfu] 'default_empty_value' doesn't work

2008-10-31 Thread Juergen Mathwich
Am Freitag 31 Oktober 2008 10:23:29 schrieb Carl Franks: > 2008/10/31 Michele Beltrame <[EMAIL PROTECTED]>: > > Hi Juergen! > > > >> 3. add the suggested "default_if_unchecked" to formfu > > > > On secondo thought, this might not be a good idea. A checkbox, by > > definition, doesn't have a value i

Re: [html-formfu] 'default_empty_value' doesn't work

2008-10-31 Thread Carl Franks
2008/10/31 Michele Beltrame <[EMAIL PROTECTED]>: > Hi Juergen! > >> 3. add the suggested "default_if_unchecked" to formfu > > On secondo thought, this might not be a good idea. A checkbox, by > definition, doesn't have a value if unchecked. If you have a: > > > > it's either "1" or nothing at all

Re: [html-formfu] 'default_empty_value' doesn't work

2008-10-31 Thread Michele Beltrame
Hi Juergen! > 3. add the suggested "default_if_unchecked" to formfu On secondo thought, this might not be a good idea. A checkbox, by definition, doesn't have a value if unchecked. If you have a: it's either "1" or nothing at all (undefined). The "empty_if_unchecked" thing is useful for testin

Re: [html-formfu] 'default_empty_value' doesn't work

2008-10-31 Thread Juergen Mathwich
Am Freitag 31 Oktober 2008 09:47:39 schrieb Carl Franks: > 2008/10/31 Juergen Mathwich <[EMAIL PROTECTED]>: > > Hi Michele > > > > Thanks for your reply. > > > > I read following information from this thread > > http://lists.scsys.co.uk/pipermail/html-formfu/2008-August/001334.html > > > >> If you'

Re: [html-formfu] 'default_empty_value' doesn't work

2008-10-31 Thread Carl Franks
2008/10/31 Juergen Mathwich <[EMAIL PROTECTED]>: > Hi Michele > > Thanks for your reply. > > I read following information from this thread > http://lists.scsys.co.uk/pipermail/html-formfu/2008-August/001334.html > >> If you're using hand-rolled code to update the database - be aware >> that the bro

Re: [html-formfu] 'default_empty_value' doesn't work

2008-10-31 Thread Juergen Mathwich
Hi Michele Thanks for your reply. I read following information from this thread http://lists.scsys.co.uk/pipermail/html-formfu/2008-August/001334.html > If you're using hand-rolled code to update the database - be aware > that the browser doesn't send anything back for unchecked checkboxes - >

Re: [html-formfu] 'default_empty_value' doesn't work

2008-10-31 Thread Michele Beltrame
Hi Juergen! > shows me that it is empty, not 0 as expected: > > 'ACTIVE' => '', I think this is the expected behaviour: the field is empty as opposed to undefined. If you want it become 0 you could add a transformer to your checkboxes. Or, maybe, default_empty_value could b

[html-formfu] 'default_empty_value' doesn't work

2008-10-30 Thread Juergen Mathwich
Hi I have a (part of) a form like this: $VAR1 = { 'default_empty_value' => 1, 'constraints' => [ {