> I need to create a form with 15 minutes blocks that
> people can choose a block to sign up for.  The page
> is receiving a variable for the number of blocks the
> person needs (1 =15 mins, 2 =30 mins, etc) and it
> has to be able to check the datasource if those
> spots are already taken for the next person who
> signs up.

You could take the start and end times that the blocks are available, total
the minutes, then divide by 15.  This would give you a count of the blocks
(ex: there are 96 15 minute blocks for a given day: (60*24)/15=96).  Each
block would have an ID number within this span.  To make the span expandable
in the future you could use 1-96 and only make certain ones available using
a from/to loop to go between the ones you want.  This could even be dynamic
with different ranges for different days, etc.

In the database, store what block each user has selected for a given date.
When the form is presented, loop through your blocks and show each one as
either available or taken based on what's already in the database.

Since the form already knows how many consecutive blocks they need, you
could even disable spans that do not contain enough blocks for their needs
to help them see what is really available for their needs.

For the selection, each block could have a checkbox for the user to select
it.  In your error checking you could check for consecutive blocks, etc.
Store their selections in the database and move on.

Anyway, those are just some ideas that come to mind to start with.  Hope
that helps...


-Justin Scott


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203153
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to