Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: attributes force selection

    Quote Originally Posted by gjh42 View Post
    You can't use checkboxes and force a selection
    aahhhh, that I did not know. Thanks for mentioning it. That saves me the long route of finding it out myself.

    I'll leave it be and move on to something else.

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: attributes force selection

    Checkboxes (in any form submission) are for MULTIPLE values:

    They allow a user to choose "A" and "B" and "C"... or "A" and "C"... or "B" and "C"... (etc).

    ... so you cannot FORCE a single selection with checkboxes.

    You can only force selections where there are several values, but only one can be selected - and this then applies to dropdowns and radio buttons.

    To FORCE a selection, one creates a "DISPLAY ONLY" OPTION VALUE in any given dropdown/radio-button value set. You make this the DEFAULT value, and it is also a good idea to give it the lowest sort-order number, so it appears FIRST in the list.

    If the visitor fails to make a selection, they cannot proceed to add-to-cart, and an alert message shows, telling them they MUST make a choice in these options, before a product can be added to the cart.

    EG:

    Option NAME = "Shirt Colour"

    Option VALUES for "Shirt Colour" :-

    (Sort order 1) Please make a selection... (Display Only and Default option)
    (Sort order 2) Red
    (Sort order 3) Green
    (Sort order 4) Blue
    20 years a Zencart User

  3. #3
    Join Date
    Jun 2008
    Posts
    627
    Plugin Contributions
    0

    Default Re: attributes force selection

    Quote Originally Posted by schoolboy View Post
    Checkboxes (in any form submission) are for MULTIPLE values:

    They allow a user to choose "A" and "B" and "C"... or "A" and "C"... or "B" and "C"... (etc).

    ... so you cannot FORCE a single selection with checkboxes.
    I understand checkboxes are for multiple choices and I'm not wanting to force a single choice from among the checkboxes. I just wanted to force at least one choice so the cart isn't 0.00 when someone clicks add to cart and they haven't made any selection. Thanks schoolboy.
    Last edited by buildingblocks; 28 Oct 2011 at 01:09 PM.

 

 

Similar Threads

  1. Force Template Selection
    By philip937 in forum General Questions
    Replies: 2
    Last Post: 30 Aug 2011, 08:37 AM
  2. Force attribute selection?
    By jenpen in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 28 Jan 2011, 12:18 AM
  3. Force Attribute Selection
    By michellepchy in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 5 Aug 2010, 09:16 PM
  4. Force Selection of an Attribute
    By FoodDudes in forum General Questions
    Replies: 1
    Last Post: 22 Feb 2009, 03:53 AM
  5. Force Selection of Attributes? & a way to position them better?
    By brian02138 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 17 Jan 2008, 07:10 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