Re: Blank "select" field/FromCGI
[prev]
[thread]
[next]
[Date index for 2004/09/11]
Jesse Sheidlower wrote:
>So, what do I need to do to ensure that nothing is inserted
>into these columns when the select fields are blank?
>
>I'm sure this is something really obvious, and probably not
>related to CDBI, but it's probably also something that people
>need to do with CDBI, so I'd be grateful for any advice.
>
>
>
In your CDBI sub-class for the table you probably want to have a
before_create trigger that checks the value of format and changes it
from "" to undef.
What might be useful here is to to specify an explicit value instead of
an empty option.
e.g. <option value='undef'>No Format</option>
Clayton
|
|
Re: Blank "select" field/FromCGI
Clayton Scott 17:25 on 11 Sep 2004
|