Forums / Setting Up Categories, Products, Attributes / Any update on required checkbox or deselect single radio button??

Any update on required checkbox or deselect single radio button??

Started by ladybugmom on 15 Feb 2011, 7:55 PM · Views: 1,917

Results 1 to 7 of 7
15 Feb 2011, 7:55 PM
#1
ladybugmom avatar

ladybugmom

New Zenner

Join Date:
Nov 2008
Posts:
40
Plugin Contributions:
0

Any update on required checkbox or deselect single radio button??

I need to add a statement to individual products. I need customers who are uploading artwork or adding text to an existing product to agree to my design policy before the product can be added to the shopping cart. They can not redesign every product so it has to be on an individual product basis.

I do have the text as required, no problem, I just can't figure out a way to make either a checkbox required or a radio button deselected so that the customer is required to agree to my policy. It would be kind of silly to have two radio buttons with two options for agree, or a checkbox that could or could not be checked when I need for them to agree on each individual product that they are designing.

I read in older posts that checkboxes did not have a required function, and wondered if this is something that has been updated. Or anything new on having a single radio button deselected.

Any help or hints would be greatly appreciated.

Thanks,
ladybugmom :smile:

15 Feb 2011, 9:30 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Any update on required checkbox or deselect single radio button??

It would be possible to have the standard recommended "Select" default/display only option along with the one "useful" radiobutton, and then hide the display only one with CSS so it doesn't clutter up the page.

Actually, a radiobutton attribute is not automatically selected unless set as default, so you could just put a singleton in the product page. This wouldn't require checking before purchase, though, so is not what you want.

15 Feb 2011, 9:45 PM
#3
ladybugmom avatar

ladybugmom

New Zenner

Join Date:
Nov 2008
Posts:
40
Plugin Contributions:
0

Re: Any update on required checkbox or deselect single radio button??

Thanks, I will try to work on the hide the display only attribute. That sounds like a good idea.

If not I am playing with the drop down menu too.

Thanks again,
Ladybugmom :smile:

16 Feb 2011, 7:22 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Any update on required checkbox or deselect single radio button??

You need to know the attribute id to hide it with CSS. If I can see the site (and the attribute with the "Select" in place ready to hide), I can tell you the exact style rule to use.

16 Feb 2011, 3:57 PM
#5
ladybugmom avatar

ladybugmom

New Zenner

Join Date:
Nov 2008
Posts:
40
Plugin Contributions:
0

Re: Any update on required checkbox or deselect single radio button??

Thank you for your help, I could have never done it without you steering me in the right direction!

My solution:

Option Name (name id=3): I agree to BBB's Design Policy (radio)
Option Value (value id=2): blank (sort order 1)
Option Value (value id=1): Please select you agree (sort order 2, display only, set as default)

Then in my CSS (found in older thread - match it to your attribute id):

#attrib-3-1, #attrib-3-1+label, #attrib-3-1+label+br {display: none;}

This gives me:

I agree to BBB's Design Policy O

It is required that they mark the radio button or they get an error message:

"For the Option: I agree to BBB's Design Policy: Please select you agree"

This works out beautifully! Thank you, thank you, thank you :clap:

Thanks again,
Ladybugmom :smile:

16 Feb 2011, 4:04 PM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: Any update on required checkbox or deselect single radio button??

And thanks for posting the detailed solution to help others who don't understand the process as well as you do.

16 Aug 2012, 4:21 AM
#7
tording99z28 avatar

tording99z28

New Zenner

Join Date:
Aug 2012
Posts:
2
Plugin Contributions:
0

Re: Any update on required checkbox or deselect single radio button??

Can anyone give me a hand with exactly how this was done? Ladybugmom says that she matched her CSS code to her attribute ID. What does she mean by this?

I am trying to do a very similar thing with my store so that the customer has to check the box to say that they have read the sizing instructions before they can check out. Can someone give me a hand with this?