You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dustin Jenkins <dj...@invoqsystems.com> on 2005/02/25 19:35:43 UTC
CForms submit checkbox
How do I get the value of the submitted checkbox from a form in my
flowscript? Currently I have this after the showForm() call:
var model = myForm.getModel();
var cbox_value = model.myCheckBox;
cbox_value always returns false, even when it's checked. Am I doing
this right? All other widgets submit fine.
Thanks,
Dustin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [SPAM] - Re: CForms submit checkbox - Sending mail server found
on relays.ordb.org
Posted by Dustin Jenkins <dj...@invoqsystems.com>.
This is resolved. Turns out the value had to be set to true on the
widget (i.e. <input type="checkbox" name="mycbox" *value="true"* />)
Weird...
Thanks
Carlos Chávez wrote:
>Dustin Jenkins Escribio :-)
>
>
>>How do I get the value of the submitted checkbox from a form in my
>>flowscript? Currently I have this after the showForm() call:
>>
>>var model = myForm.getModel();
>>var cbox_value = model.myCheckBox;
>>
>>cbox_value always returns false, even when it's checked. Am I doing
>>this right? All other widgets submit fine.
>>
>>
>
> try model.myCheckBox.booleanValue(), but i never used in that way,
>
> i'm using myForm.getChild("myCheckBox").getValue().booleanValue()
>
> Cheers.
>
> Carlos Chávez.
>
>
>
>>Thanks,
>>Dustin
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: CForms submit checkbox
Posted by Sylvain Wallez <sy...@apache.org>.
Carlos Chávez wrote:
>Dustin Jenkins Escribio :-)
>
>
>>How do I get the value of the submitted checkbox from a form in my
>>flowscript? Currently I have this after the showForm() call:
>>
>>var model = myForm.getModel();
>>var cbox_value = model.myCheckBox;
>>
>>cbox_value always returns false, even when it's checked. Am I doing
>>this right? All other widgets submit fine.
>>
>>
>
> try model.myCheckBox.booleanValue(), but i never used in that way,
>
> i'm using myForm.getChild("myCheckBox").getValue().booleanValue()
>
>
Yep, this is better. Moreover, "model.xxx" will be deprecated very soon
and removed in the future, as it introduces a parallel API to the Java
API that doesn't follow the usual Java and JS conventions.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://www.apache.org/~sylvain http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: CForms submit checkbox
Posted by Carlos Chávez <cc...@agssa.net>.
Dustin Jenkins Escribio :-)
> How do I get the value of the submitted checkbox from a form in my
> flowscript? Currently I have this after the showForm() call:
>
> var model = myForm.getModel();
> var cbox_value = model.myCheckBox;
>
> cbox_value always returns false, even when it's checked. Am I doing
> this right? All other widgets submit fine.
try model.myCheckBox.booleanValue(), but i never used in that way,
i'm using myForm.getChild("myCheckBox").getValue().booleanValue()
Cheers.
Carlos Chávez.
>
> Thanks,
> Dustin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
--
Carlos Chávez
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org