|
From: Marcus B. <ma...@la...> - 2004-04-17 01:04:34
|
Hi...
I fully understand why this was a problem. I meant to document it, but
simply forgot. Sorry :(.
Thomas Carrié wrote:
> I'm still having problem with the lack of documentation, the doc doesn't
> explain how to set a non multiple value check box (I have looked through the
> code too! ) :
I do actually follow the HTML spec here and for once so do the browsers.
Trouble is the spec is decidedly wierd. The value of a checked checkbox
is the value attribute, but it doesn't even appear if unchecked. The
default for the value attribute is "on" (I kid you not).
>
> Spamassassin enabled ? <input name="spamassassin" type="checkbox"
> class="textfield">
>
> I have tried this :
>
> $this->setField('spamassassin', 'checked');
> $this->setField('spamassassin', true);
You actually want...
$this->setField('spamassassin', 'on');
I may add a (boolean) true default to mean whatever the value is ('on'
by default) when setting this type of field.
To uncheck it...
$this->setField('spamassassin', false);
> Thanks for your help
yours, Marcus
--
Marcus Baker, ma...@la..., no...@ap...
|