Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Checkbox Group: How to limit max allowed Checks in a Group?
Last Post 07-24-2013 05:49 AM by Ryan Bakerink. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
vr1001 vr1001User is Offline
river guide
river guide
Posts:115
Avatar

--
07-18-2013 11:15 AM
    Hi,

    Thanks a lot in advance for helping me with this

    I have a Checkbox Group called "Options"; it has the following Checkboxes:

    OPTIONS_Group A (select a maximum of 3 Options from the following)
    ----------------------------------------------------------------------------
    Option 1 [ ]
    Option 2 [ ]
    Option 3 [ ]
    Option 4 [ ]
    Option 5 [ ]
    Option 6 [ ]



    OPTIONS_Group B (select a maximum of 2 Options from the following)
    ----------------------------------------------------------------------------
    Option 1 [ ]
    Option 2 [ ]
    Option 3 [ ]
    Option 4 [ ]
    Option 5 [ ]
    Option 6 [ ]

    1. Can we refer to inidividual checkboxes with short names like $(GroupA_Option1), $(GroupA_Option2), $(GroupB_Option3), $(GroupB_Option5), etc....?

    2. If so, users should be able to select a Maximum of THREE (3) Checkboxes under Group A and a Maximum of TWO (2) Checkboxes under Group B. Is it possible? If so, how to implement it please?

    3. If the above feature is possible, how to pass values from a drop down list to the GroupA_Max_Allowed and GroupB_Max_Allowed?

    Example: I have a dropdown list where users choose a top level option or scheme from a list of entries like :
    - Scheme1-3A-4B
    - Scheme1-2A-3B
    - Scheme1-1A-3B
    - Scheme1-4A-2B
    - Scheme1-5A-2B

    - Scheme1-3A-4B  (this means, allow a max of 3 Options from Group A and a max of 4 Options from Group B)


    So there are THREE Lists here:
    SCHEME - mega options dorop down List: [shortname: $(Scheme)

    GROUP A Options - a list of Checkboxes put together under Group A

    GROUP B Options - a list of Checkboxes put together under Group B




    I am hoping to do this:
    After users selecting the Scheme, we will have something like this.
    $(Scheme) = Scheme1-3A-4B

    From this, I want to "set" the max allowed limits:

    $(GroupA_Max_Allowed) = LEFT($(Scheme),9,1)

    $(GroupB_Max_Allowed) = LEFT($(Scheme),12,1)


    Note: I don't Javascript either; I need help with extracting these numbers from the selected "Scheme". I just used Excel like String functions here

    By setting $(GroupA_Max_Allowed) = 3 and $(GroupB_Max_Allowed)  = 4, I am assuming the users will be allowed to check a max of 3 boxes from Group A and a max of 4 boxes from Group B 

    Please help me how to accomplish this

    Thanks a lot in advance!
    Best,
    Vijayv
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    07-19-2013 06:24 AM
    Hello Vijay,

    Regarding #1 above, you can't use a token to refer to an individual checkbox within a Checkbox Group. We have several functions within the Dynamic Forms Custom JavaScript file under Module Configuration. Typically if you need to perform any type of logical constraints with a Checkbox group you'll need to use JavaScript.

    You'll probably need to build a custom JavaScript function to read through all checkboxes within your checkbox group, perform a count, and based on that, state that the maximum # of checkboxes have been checked or not.



    You're going to need to incorporate JavaScript extensively to achieve this type of functionality. You'll need to build a custom JavaScript function to detect the Scheme selected and based off of that provide the rules of selection to Group A and Group B checkboxes.

    I don't have any example JavaScript that you could reference to achieve this. I know that you stated that you have no prior knowledge with JavaScript. So you may want to consider passing this along to a developer or development firm to assist you.

    Data Springs has a service called Premium Support, whereas you would basically purchase hours from us and in turn we use this time in any way you see fit. Learn more by reviewing the page below:

    www.datasprings.com/support/premium-support/premium-support-options

    For a task like this, I would estimate 2-3 hours for implementation and testing.

    Please let me know if you have any questions.

    Thanks,

    Ryan


    vr1001 vr1001User is Offline
    river guide
    river guide
    Posts:115
    Avatar

    --
    07-20-2013 04:11 AM
    Hi Ryan,

    Thanks a lot for your prompt response.

    I found the Javascript code that does exactly what I need

    http://www.javascripttoolbox.com/lib/checkboxgroup/examples.php

    Source:
    http://www.javascripttoolbox.com/lib/checkboxgroup/source.php

    Compact Source:
    http://www.javascripttoolbox.com/lib/checkboxgroup/source.php?view=compact

    But I need your help with "how to use that code" in my form ...

    What part of the code should be inserted in the Global Javascript and what portion of it should be inserted in the "Client Side Event" box?

    Since this javascript also has code to "create" form elements like Checkboxes, how do I "access" these checkboxes in my Form?

    I want these Checkboxes to show up always (regardless of any other event on the form).

    If you have ANY example showing ANY javascript involving Form elements, that would be great.

    Please help me

    Cheers,
    Vijay

    Please email me the cost involved in integrating this available Javascript with my Form.

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    07-24-2013 05:49 AM
    Hello Vijay,

    When it comes to Checkbox Groups in Dynamic Forms you'll want to familiarize yourself with the following JavaScript DOM functions:

    document.getElementByName()
    AND
    document.getElementByID()

    We have a function in our Custom JavaScript File called CalculateCheckboxList or something closely named, where you pass the ID of the Checkbox Group to determine the checked checkboxes. You can copy/paste this function and make your own function based on your rules and scope of this task. Unfortunately I don't have any examples that I can share, I would recommend continuing your search on the web for an example that closely matches your needs.

    This is using jQuery:
    http://stackoverflow.com/questions/...-in-a-form

    This is using JavaScript:

    http://stackoverflow.com/questions/...ser-in-php

    http://forums.devshed.com/javascrip...85239.html

    The examples above provide great snippets that you can copy/paste and make it your own. I'm not saying that you should copy/paste the entire scripts in these examples, just bits and pieces.

    I believe I originally estimated 2-3 hours of development time if Data Springs were to take this task on. Of course we'd need to get together and determine the set requirements and scope for this project.

    Please let me know if you have any questions.

    Thanks,

    Ryan
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
     
     
       
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi