Hi,

> Form.serialize(true) sends the true value even
> when it is not checked.

Not in my experience:
http://jsbin.com/uxiko4

HTH,
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com

On Jul 30, 6:56 pm, strimp099 <strimp...@gmail.com> wrote:
> Greetings all:
>
> When sending form variables as a hash using Form.serialize(true), the
> value attribute of unchecked checkboxes is sent to the POST page. This
> of course is contrary to how HTML treats checkbox form variables.
>
> for example, I have the following checkboxes:
>
> <input type="checkbox" name="destructor" value="true" id="destructor"
> checked="checked" />
> <input type="checkbox" name="constructor" value="true"
> id="constructor" checked="checked" />
>
> I only want destructor and constructor to be passed as true if the
> checkbox is checked. Form.serialize(true) sends the true value even
> when it is not checked.
>
> Does anyone know how to ensure that if a checkbox is not checked, the
> value attribute will not be sent when using Form.serialize()?

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to