Recently Viewed...
To help you navigate to pages you most recently visited, select from the links below.
Product Forums
Newsletter
Sharepoint Forums
Dynamic Forms Demonstrations
Page Tags
DNN Modules
SnowCovered Top Sellers

'Relationship Building' and 'Communication' are two essential nuts and bolts for a business to prosper. This module allows you to bridge both of these and easily generate continuous awareness of your web site, products and services. Your prospects and customers will greatly appreciate this featur

A 16-in-1 dnn module.Powerful yet easy to use. Capable of producing a multitude of functions including:Image rotator/Numeric rotator/ Mp3 player/Wmv player/ Flash video player /YouTube video player/Multimedia player / Text-to-speech podcast / Flipping book player/Banner topic player/Silverlight albu

Version 5 of the perennial best-selling tool for creating data-based solutions in DNN without custom programming. This version focuses on greater flexibility, expandability, and ease-of-use.

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to add videos in various format and automatically convert them to flv format, you also can add videos from embed code and play them in our integrated flash video player.

The award winning discussion forum and community solution for DotNetNuke is now even better. When you need to build the best community site, you need the best module, Active Forums!

Gloss is the first ALL COLORS! skin, featuring a powerful XML-based flash and being 100% W3C CSS XHMTL1.0 compliant. Tune it yourself on the fly, changing colors, backgrounds, containers, text color and size, width and more! Brilliant!Available for DNN4 and DNN5

Powerful, Ajax Enabled, Easy to Use. Document Management has never been better. Open-DocumentLibrary allows DotNetNuke users to share and manage documents in a flexible, intelligent way, offering granular control over Folder and Document access.

ALL NEW ! - Minimalist includes skin packs in 12 great colors. Each color has Flat, Gradient and Glass versions. Feature rich XML Flash header, perfect for just about any purpose. 9 Different menu options in each skin pack; 3 horizontal menus, 3 vertical menus and 3 all-new Twin level menus . . .

Live Content uses Web 2.0 approach to provide a Rich User Interface and streamlines content presentation by overlaying content on current page. Overlay images, videos, audio, text/html content, flash, dotnetnuke modules, and external content. Experience the demo...

Ultra Media Gallery is the most popular photo gallery and media gallery solution for DotNetNuke, UMG offers 10 different flash player to browse your gallery with completely different user interface experience.

    |   Register   |   Thursday, January 08, 2009   
Data Springs Product Forums...
Subject: Combo Box - Change the Option List based on Number of Registrations
Prev Next
You are not authorized to post a reply.

Author Messages
Michael
Posts:9


03/25/2008 6:52 AM  

Combo Box – Registration with Limits on the number of attendees.

I have an application where we are collecting the reservations for breakout sessions at an all day event. Some of the breakout sessions are in large rooms and can handle everyone at the event. Others are space limited and can only hold a small number of people. Rather than allowing everyone to register and then call them to let them know they can’t attend, I decided to change the list of options depending on how many people were registered.

Data Base Support:

I added two tables to my SQL Database: helm_meetinglist and helm_meetingres.

Helm_meetinglist

                MeetingShort varchar(50) (used for the Question Options
                Meeting varchar(50) (used for the Question Option Value
                Session varchar(50) (groups the meetings by time period)
                maxnum int  (sets the maximum number of attendees

Helm_meetingres

Registration Unique ID
Session varchar(50)
Meeting varchar(50)
Number int (how many people registered for one registration form)
ReservationTime Timestamp

The first table allows me to flexibly change the meeting list and schedule without changing the dynamic question definition. The second table is used to track how many people are currently registered for each meeting at the event.

Form Event:

When a form is saved, the following insert is executed for each combo box on the form. This saves the amount of seats reserved.

insert into dbo.helm_MeetingRes
(UserName, Session, Meeting, Number) values
($(UserID), 'Session A', '$(SessionA)', $(NumResSA1))

Whenever a form is saved, the number of people reserving spots for each meeting is saved to the helm_meetingres table.

Getting the list

When setting up the combo box, I use the SQL option to populate the option list. For this project the selection query is of the form:

select MeetingShort as QuestionOption, Meeting as QuestionOptionValue
from dbo.helm_meetinglist a
where session = 'Session A'
and maxnum > isnull((select sum(number) as curnum
    from dbo.helm_meetingres b
    where session = 'Session A'
    and a.meeting = b.meeting), 0)
    order by displayorder

The IsNull function is used to provide 0 as the number of reservations when there are no tables in the row. Otherwise the query fails and returns nothing.

 

When someone opens the form, the list is generated based on the number of current registrations. It is possible to overbook for a meeting if two people load the form at the same time but the chance of this is fairly small. In the event that this happens, we may need to contact the second person to let them know the meeting was full. We use the timestamp to break ties.

I hope this is useful to someone else. I have multiple dynamic forms on this website accomplishing everything from giving instructions before the person registers (and asking them to say they read the instructios) to an Email generation page to make it easier for people to send emails to their legistators.

Chad
Posts:2387
river guide
river guide

03/25/2008 9:15 AM  
Big thanks for the post Michael... I think many users will find this useful for conditional type of form dropdownlists and options... Maybe users want to use Dynamic Forms / Dynamic Registration for events and classes where they often can run out of rooms etc...

Thanks again.

-Chad
You are not authorized to post a reply.
Forums > Product Discussion - DotNetNuke Modules > Dynamic Forms > Combo Box - Change the Option List based on Number of Registrations



ActiveForums 3.7

Copyright 2005 - 2009 by Data Springs, Inc.
Terms Of Use | Privacy Statement