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!

Limiting number of selections in a combo box or checkbox question
Last Post 04-08-2010 07:14 AM by David To. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
THSUser is Offline
going with the flow
going with the flow
Posts:48
Avatar

--
04-07-2010 07:06 AM

    Is there any way to limit the number of selections that can be made in a checkbox or checkbox group other than just one or multiple? Here's my dilema:

    This is an event registration form where a registrant can select to purchase 1, 2, 3 or 4 optional workshops. There are a total of 16 to choose from where four workshops are running concurrently on any given day/time (four workshops on monday morning, four workshops on monday afternoon, etc). So, the idea is to prevent a registrant from selecting two workshops that occur at the same time. This is simple for those selecting one or four workshops since that can be handled with specific grouping of radio button questions, but if they do two or three, there's no way to group the workshops using the radio button option that would always prevent selecting one or more sessions that occur at the same time. So, the idea is to use a checkbox question of all workshops and then depending on a previous question that defines how many they bought (via a question event or completion event that would take them to a specific page), they would be limited to one, two, three or four checks. My initial thought would be some sort of SQL validation that would count the number of checkboxes and return an error/notification if they didn't select enough or too many. Any ideas on how that could be done? Is there a better way to do this?

    -Tim

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    04-07-2010 07:12 AM
    HI, the best way to handle this would be to use SQL validation on the checkbox group. Call a stored procedure, perform your logic there and return IsValid = 1 for passing validation or IsValid = 0 for not passing validation.

    The SQL validation would loop/parse the checkbox group string submission and perform a counter to determine how many options they choose. -- David
    THSUser is Offline
    going with the flow
    going with the flow
    Posts:48
    Avatar

    --
    04-07-2010 07:27 AM

    Hi David -

    OK... rethinking this I realized I'll still have to use radio buttons to group the workshops since there's the concurrent date/time issue. So, I'd have to have the following radio button groups:

    Monday AM

    WS1
    WS2
    WS3
    WS4

    Monday PM

    WS1
    WS2
    WS3
    WS4

    Tuesday AM

    WS1
    WS2
    WS3
    WS4

    Tuesday PM

    WS1
    WS2
    WS3
    WS4

    So, the question now is is there a way to SQL validate these four radio options and count whether they selected 1 thru 4 and then present a message like "only select one workshop", "only select two workshops", etc.

    -Tim

    THSUser is Offline
    going with the flow
    going with the flow
    Posts:48
    Avatar

    --
    04-07-2010 08:13 AM

    I'm now thinking with this scenario that a jscript would be the better way to go that would "count" the number of selections and then based on an if statement comapring to a constant (1,2,3,4) would then display a message about having to select the appropriate number of workshops and prevent the page from submitting... does that make sense?

    -Tim

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    04-08-2010 07:14 AM
    HI, yes this is possible. You can create an SQL stored procedure, passing all four radio button shortname tokens along and check if each of the radio buttons are blank or have values in them and increment a counter and based on the counter, return the IsValid value for what you want valid or not. -- David
    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