The CheckBox Component is unusable in this state, i think i'll have a
look into the zend dojo tests to know how to make it work.
Matthew Weier O'Phinney a écrit :
-- Apsy <[EMAIL PROTECTED]> wrote
(on Tuesday, 23 September 2008, 10:55 PM +0200):
I would like to know if for you my code is correct, because is so,
there's a bug in the Dojo Checkbox Component :p
Didn't you report this on the tracker already? If not you, somebody else
has...
$cgu_accept = new Zend_Dojo_Form_Element_CheckBox('cgu_accept');
$cgu_accept->setDijitParam('invalidMessage', 'You must validate the cgu');
$cgu_accept->setCheckedValue('checked');
$cgu_accept->setUncheckedValue('unchecked');
$cgu_accept->setLabel('blablabla')
->addValidator(new
Zend_Validate_Identical($cgu_accept->getCheckedValue()))
->setIgnore(true);
produces HTML code :
<dd>
<input type="hidden" value="0" name="cgu_accept"/>
<div wairole="presentation" class="dijitReset dijitInline
dijitCheckBox" role="presentation" widgetid="cgu_accept">
<input
type="checkbox"
dojoattachevent="onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick"
dojoattachpoint="focusNode"
class="dijitReset dijitCheckBoxInput"
name="cgu_accept"
id="cgu_accept"
value="0"
tabindex="0"
style="-moz-user-select: none;"/>
</div>
</dd>
As you can see here, i've defined the "checked' and 'unchecked" value
but i have a 0 in the input value for the both...
Any Help ?