Announcement

Collapse
No announcement yet.

Checking of Radio Buttons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Checking of Radio Buttons

    I have created a product with several choices for colours and I am using the radio button layout however when you first go to the page the first colours radio button is automatically selected.
    Is it possible to make it so that none of the radio buttons are auto selected so that the customer is forced to have to choose an option.
    Paul Brebner
    www.e-Hardware.co.uk

    #2
    Have a look at your radio button layout code, if it looks like this:
    Code:
    <input type="radio" name="TB" checked="checked" value="A" />
    then remove [ checked="checked" ] bit?
    Paul
    Flower-Stands.co.uk - the UK's largest online supplier of Fresh Flower Merchandising Stands

    Using V10.2 with Norman's brilliantly simple TABBER.

    Comment


      #3
      You need to look in the HTML for the radio button layout, the default item will have the attribute 'checked' against it:

      Example<input type="radio" name="shoesize" Value="10" checked="checked" />

      Delete the checked attribute. I'm not sure if this will work, or whether the browser will just assume that the first option in the list should be checked if you don't specify as HTML assumes that you will have one as a default I believe (I can't remember at the moment)
      Steve Griggs.

      "People in business often miss opportunities, mainly because they usually arrive dressed in overalls and looking like work."



      www.kitchenwareonline.com
      www.microwave-repair.co.uk

      Comment


        #4
        Simply setting all radio buttons to unchecked won't stop the product being added to the Cart. Probably leading to erroneous orders with no information as to the required choices.

        You'd need some JavaScript to detect that nothing had been checked.

        I have an add-on "Choice Validation" that does this. Here's a note from its ReadMe:
        This patch adds the capability to optionally validate drop-down choices to ensure
        that a selection other than the first is made. You don't need to make a "Please Select..>"
        option in drop-down lists as it will be added automatically.

        It also can be used on radio button choices. Here it sets all choices to unchecked and makes sure that one is chosen before allowing the Add to Cart.

        The error message for each invalid drop-down or radio button is user definable.

        It also checks Date fields to ensure that the default e.g. "1st Jan 2000" date isn't used.

        The error message for each invalid date is user definable.
        Email me for details if you need this.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X