Best Way To Offer a List of Times In A Form

66 views
Skip to first unread message

Doug Roberson

unread,
Mar 27, 2015, 12:29:23 PM3/27/15
to lu...@googlegroups.com
Good day, all!

This is more of a design question or a general CFML question than a Lucee question. If this sort of question isn't welcome here, please let me know and I'll keep them to myself in the future.

I'm redoing a friend's site that allows parents to register kids for different kinds of cooking classes (and pay for the class). 

One type of class is held at Whole Foods and the business owner (my friend) wants to allow parents wandering through the store to sign up for a class that is going on at that time.

Naturally, you don't want to let parents sign up when too much of the class has elapsed, so I want to write a function that sets the session to inactive after N minutes pass.

The business owner is not very savvy, so I try to simplify things as much as possible, and pre-format everything that I can because she WILL find a way to defeat validation. 

My current idea is to throw together a table with a column in TIME format (MySQL) and display the rows in a cfselect.

Is there a better, simpler, or more "best practice" way of doing this?

And, if the question is out of place, please disregard.



Nando Breiter

unread,
Mar 27, 2015, 1:47:27 PM3/27/15
to lu...@googlegroups.com



Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/9b2ebc15-35ad-4a85-9ee7-2a3a5548501e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Doug Roberson

unread,
Mar 27, 2015, 1:51:33 PM3/27/15
to lu...@googlegroups.com
On one hand, I'll have to jump into jQuery (but i had to do that anyway, for data tables). On the other hand, I really like the Step and DisableTimeRanges functions. 

Guess what I'm doing this weekend?  :)

Thank you, Nando!

Seth Johnson

unread,
Mar 27, 2015, 6:10:52 PM3/27/15
to lu...@googlegroups.com

Rather than timing out their session you might want to consider using websockets to automatically update the user's browsers as the sessions fill or the signup period expires.

Seth

Doug Roberson

unread,
Mar 27, 2015, 7:07:48 PM3/27/15
to lu...@googlegroups.com
Hi Seth

Thanks for taking the time to help me out! 

I probably should have described the situation a bit differently.

Example - the business owner has a kid's cooking class at Whole Foods on 3/27/2015 at 1:00 pm.

When the parents are wandering around Whole Foods and see the class, they can sign up and pay on the website and leave the little crumb snatchers at the class.

The business owner wants the class to stay open until a certain number of students enroll (20, for instance) or until a few minutes before the class ends.

On the sign-up page, the first of the code will call a function to see if either of these conditions are met (max enrollees or class end). If either condition is met, the class will be deactivated and will not be displayed in the list of available classes.

There are other types of classes that run once a week for multiple weeks, as well as summer camps that are daily for several weeks. Each kind will have its own termination code, but they will be based on date, rather than time.

Seth Johnson

unread,
Mar 28, 2015, 11:12:50 AM3/28/15
to lu...@googlegroups.com
I understand the use case.  I was just suggesting use of a websocket for real time update of the availability (or expiration) of classes instead of expiring their session.  Ping me off list if you would like to see an example of what I am suggesting.

Seth

Reply all
Reply to author
Forward
0 new messages