Zen Cart Logo

Radio Button requirement

Locked

Views: 1,220

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
20 Dec 2007, 9:21 PM
#1
tpascubarat avatar

tpascubarat

New Zenner

Join Date:
Dec 2007
Posts:
64
Plugin Contributions:
0

Radio Button requirement

We have several products that come with certain configurations (4 configurations and a n/a). I don't want to have a selection default to any radio button, but I still require one button to be selected. Upon adding to cart, if there is a missing selection, the customer needs to be informed. Please refer to the link below for more detail.

http://www.sunbustersonline.com/index.php?main_page=product_info&cPath=113_115&products_id=187

20 Dec 2007, 9:34 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Radio Button requirement

You have to have a default in order to be sure of having a selection.

The thing to do is make another value for that option name called "Select" or whatever. In Attributes Controller, add "Select" and make it default and display only.

Then customers will be forced to make a conscious selection.

20 Dec 2007, 9:39 PM
#3
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: Radio Button requirement

In your attribute controller, just select which radio button you want selected by default.

21 Dec 2007, 2:41 PM
#4
tpascubarat avatar

tpascubarat

New Zenner

Join Date:
Dec 2007
Posts:
64
Plugin Contributions:
0

Re: Radio Button requirement

Thanks,

That did the trick. It works perfectly.

:smile:

21 Dec 2007, 4:20 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Radio Button requirement

If you want to get even smoother in your display, every input button has its own id and can be addressed individually in the stylesheet.

Add this to your stylesheet to hide the top radiobuttons, keaving only the "please select" message:

input#attrib-23-105, input#attrib-24-103, input#attrib-25-101 {
    display: none;
    }

This will apply to those particular attributes on every product where they appear.
You can look up other radiobutton ids in view source or with the Firefox Web Developer "Display Element Information" tool.