I belive Zend_View_Helper->FormCheckbox.php(in ZF1.5.0) has some bugs, it can
not create the checkbox correctly. The one in ZF1.0.3 works well
Kevin
dinoboff wrote:
>
> I think you have the set the initial state of of the checkbox with the
> checked attibute. The value of the checkbox is now fixed; it doesn't
> depend any more of the initial state of the checkbox.
>
> It should look like that:
> <?= $this->formCheckbox("complete", 1,
> array(
> 'checked' => $this->mainContents->complete,
> 'onChange' => "change(document.main);"
> )); ?>
>
> When validating the form, you would do something like that:
> $complete = empty($_FORM['complete']) ? false : true;
>
>
> Kexiao Liao wrote:
>>
>> I still got the same problem by using Zend_Framework 1.5. Any comments
>> regarding this issue.
>>
>> Kevin
>>
>>
>> Matthew Weier O'Phinney-3 wrote:
>>>
>>> -- Kexiao Liao <[EMAIL PROTECTED]> wrote
>>> (on Tuesday, 11 March 2008, 11:07 AM -0700):
>>>> I switched ZendFramework from 1.0.3 to 1.5.0RC1, the following
>>>> formCheckbox
>>>> can not save the the checkbox data into the database table? On 1.0.3 it
>>>> works pretty well.
>>>>
>>>> <?= $this->formCheckbox("complete",
>>>> $this->escape($this->mainContents->complete),array('onChange' =>
>>>> "change(document.main);"),array(0 =>'true', 1=>'false')) ?>
>>>
>>> Please try from svn trunk, and read the docs in svn trunk regarding the
>>> formCheckbox helper (found in
>>> documentation/manual/en/module_specs/Zend_View_Helpers.xml, IIRC); I've
>>> made some significant improvements to it in the past week.
>>>
>>> --
>>> Matthew Weier O'Phinney
>>> PHP Developer | [EMAIL PROTECTED]
>>> Zend - The PHP Company | http://www.zend.com/
>>>
>>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/formCheckbox-bug-in-ZendFramework-1.5.0RC1-tp15982415s16154p16181466.html
Sent from the Zend Framework mailing list archive at Nabble.com.