MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

RE: how to keep checkbox state?



******    message to minivend-users from "Thompson-Jordan" <Thompson-Jordan@mindspring.com>     ******

I'm thinking you could do something like:

<INPUT TYPE=checkbox NAME="box_gift" VALUE="yes" [value
name="my_box_gift"]>

One the page the form goes to you would somehow set the var to "CHECKED"
or "" depending on what the person selected.

Christopher Thompson



> -----Original Message-----
> From: owner-minivend-users@minivend.com
> [mailto:owner-minivend-users@minivend.com]On Behalf Of Ryan
> Sent: Friday, March 19, 1999 8:49 AM
> To: minivend-users@minivend.com
> Subject: how to keep checkbox state?
>
>
> ******    message to minivend-users from Ryan
> <rps@willconsult.com>     ******
>
> Hello. I am having problems keeping a checkbox state.
> If a user checks a checkbox indicating that they are
> ordering this as a gift, how can they unselect this?
> By checking the box, box_gift gets set to 1. Then
> they reload the form, and the checkbox shows up checked,
> like it should, then they uncheck it, and reload. Since
> unchecked checkboxes do not get transmitted, it stays
> set at 1. How can I get around this? Below is some of
> the code I've tried in the order profile.
>
> Thanks a lot for any help.
>
> Ryan
>
> [perl cgi values]
> # unchecked checkboxes do not get submitted, so special
> processing is required
> unless ( $Safe{'cgi'}->{box_gift}       )
>          { $Safe{'values'}->{box_gift} = 0;      }
> unless ( $Safe{'cgi'}->{box_shipto}     )
>          { $Safe{'values'}->{box_shipto} = 0;    }
> unless ( $Safe{'cgi'}->{box_correction} )
>          { $Safe{'values'}->{box_correction} = 0;}
> unless ( $Safe{'cgi'}->{box_othercat}   )
>          { $Safe{'values'}->{box_othercat} = 0;  }
> [/perl]
>
>
> -
> To unsubscribe from the list, DO NOT REPLY to this message.
> Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to
> Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
>

-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: