#737: Form Population Filter handles boolean false values incorrectly
--------------------+-------------------------------------------------------
Reporter: david | Owner: david
Type: defect | Status: new
Priority: normal | Milestone: 0.11.1
Component: filter | Version: 0.11.0
Severity: normal | Keywords:
Has_patch: 0 |
--------------------+-------------------------------------------------------
Two examples:
{{{
<input type="radio" name="cheezburger" value="0" />Nothx
<input type="radio" name="cheezburger" value="1" />Yesplz
}}}
{{{
<select name="cheezburger">
<option>Cheezburger?</option>
<option value="0" />Nothx</option>
<option value="1" />Yesplz</option>
</select>
}}}
Populating programmatically with a boolean value would not work:
{{{true}}} would select {{{Yesplz}}}, but {{{false}}} wouldn't select
{{{Nothx}}}.
Consider a situation where the boolean value comes from a database field
that allows {{{NULL}}}. Plain wrong. You open the edit form, submit it
again, and {{{false}}} values that were previously set disappear.
Same with {{{<input type="text" />}}} - it's empty for both {{{null}}} and
{{{false}}} (even though using a text input for a boolean value is
arguably a bad idea).
--
Ticket URL: <http://trac.agavi.org/ticket/737>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5
_______________________________________________
Agavi Tickets Mailing List
[email protected]
http://lists.agavi.org/mailman/listinfo/tickets