Count logged in users!

JeLu 31 Oct, 2013
Hi!

Is there a way to count how many users who has accessed a form and put them in a queue. For example:

If I have 10 places for an eventform and 12 user access the form. In the form there is a limit to 10 users to register for this event but if they access the form in the same time they will pass that check and suddenly I have 12 who has been able to book 10 places😟.

I have search this forum to see if any else have this problem but haven´t found anything.

//JeLu
GreyHead 07 Nov, 2013
Hi Jelu,

I don't think that we've ever seen exactly that problem before. It's tough to fix the point where a user has taken a place in the queue :-(

Thinking aloud . . .

Let's assume that you save completed form in a DB table so that you know how many people have successfully subscribed. You can check this on loading the form and show a sorry message if all places have gone.

If you do this then it is possible that - when there is just one place left - several people could open the form. Then you'd check the available places again when the from is submitted and the last place would go to the first user to submit.

If I understand correctly you want to put a warning of some kind when there is just one place left that users may not be successful.

The simplest solution would be to check on-load and show a message (like Amazon does) 'Just three places left'.

You could conceivably record the form opening in another table somehow and count the records there as well: 'Just three places left and four users viewing'.

That record would need to be updated in two ways (a) when that form is submitted and (b) after some period of time as some users may open the form and then just close the browser window and go somewhere else without submitting. So your check would need to delete 'queue' records both when the form is submitted, and ignore any that are more than say 15 minuted old.

Not sure if that helps?

Bob
This topic is locked and no more replies can be posted.