Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2010
    Location
    Shropshire
    Posts
    174
    Plugin Contributions
    0

    Default Radio Buttons on Attributes

    in

    http://www.zen-cart.com/forum/showth...ed+Text&page=5 on 12 Aug 2010 in a question relating to making an attribute 'rerquired' with attribute type 'radio' Ajeh says the only way is to have an extra button.

    Yes - I have the extra button and all works well.

    However I feel the presence of the button image next to the 'extra' entry is confusing.

    Is there any way using CSS or the flexible attributes addon to hide the button image on the first entry. Perhaps by making the first entry (and only the first entry) use a user defined image instead of the standard button image?

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Radio Buttons on Attributes

    Add to your stylesheet

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

    This is independent of Flexible Attributes, and will work even if you don't have it installed.

  3. #3
    Join Date
    Oct 2010
    Location
    Shropshire
    Posts
    174
    Plugin Contributions
    0

    Default Re: Radio Buttons on Attributes


    Absolutely brilliant - I only wanted to loose the button image not the text as well so I used
    Code:
    #attrib-5-3 {display: none;}
    Many Many Thanks

  4. #4
    Join Date
    Oct 2010
    Location
    Shropshire
    Posts
    174
    Plugin Contributions
    0

    Default Re: Radio Buttons on Attributes

    Thats great - now on a similar theme.
    Can anyone please tel me how can I get the radio buttons to appear on the same line.
    I have the Flexible attributes module loaded.

    I know I can hack attributes.php and edit out the line break at the end of a row, however this can split the button from the label. It also wraps all the way back under the attibute name.

    This intended to replace a mandatory text attibute which needs a date and as I have no way of checking that the customer chooses one of the dates available, or even enters a valid date, this is not ideal.
    There are 17 possible dates. I could use a drop down but that does not support 'required', so instead I thought to use radio buttons, 3 or 4 to a row depends on how it looks.

    If you take a look at http://www.freight-stop-shop.co.uk/t...products_id=83 you will see the problem for 'Available dates'.

    Note the 'Please Select' has the button hidden as advised.

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Radio Buttons on Attributes

    Flexible Attributes is built to allow this kind of layout. The readme describes some of the possibilities, as does the sample stylesheet. I can't take time right now to help more, but will check back when I can.

  6. #6
    Join Date
    Oct 2010
    Location
    Shropshire
    Posts
    174
    Plugin Contributions
    0

    Default Re: Radio Buttons on Attributes

    cheers - although I confess I dont fully understand the compexities of CSS, beyond simple '.' and '#'. Once you start chaining these together I am somewhat confused.

    I will have ago, and post on the Flexible Attributes support should (when) I get stuck

  7. #7
    Join Date
    Oct 2009
    Location
    Tennessee
    Posts
    8
    Plugin Contributions
    0

    Default Re: Radio Buttons on Attributes

    Quote Originally Posted by gjh42 View Post
    Add to your stylesheet #attrib-5-3, #attrib-5-3+label {display: none;}
    Is there anyway you can turn display off for all labels or radio buttons associated with the 5 or say all option value ID from 3 to 15 or do you have to assign for every one.

    Does that make sense?
    Last edited by _stardust_; 29 Feb 2012 at 07:09 PM.

 

 

Similar Threads

  1. v151 Attributes - Radio buttons
    By SilverHD in forum General Questions
    Replies: 9
    Last Post: 16 Nov 2013, 05:49 AM
  2. Attributes dropdown or radio buttons not wronging
    By cshart in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 15 Aug 2010, 09:45 PM
  3. Styling Attributes: Radio Buttons/Checkboxes
    By khopek in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 20 Feb 2010, 10:51 PM
  4. product attributes by radio buttons
    By Shane78 in forum General Questions
    Replies: 3
    Last Post: 28 Oct 2009, 05:19 AM
  5. Adding attributes as dropdown gives radio buttons
    By marksu in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 24 Nov 2007, 01:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg