Few weeks ago Warren needed some simple registration database and I decided to write something. So, if you want to let people to register to some action, you can try to use this one.
How can you use the database? When you’ll download it and copy to your server, first of all you need to set up ACL. It is simple, just put Anonymous inside and give him Author access with ability to create documents. And of course don’t forget to put in your server and yourself as well. Sign the database with your administration ID and open it.
In view Setup should be just one document (so create a new one or use existing), which is used to set up the global stuff, such as days and times for which you want to let people to register, email address of database (as they can confirm their registration by email; you also have to set up database as mail-in database in your Domino Directory in this case) and texts of different emails – after registration, after confirmation, after deletion of registration and when error occur.
Then switch to view Slots definition, where you have to define slot for each day and time you want people to register. For each slot you can specify different number of places and after this definition you are done. Just in case you cannot see your days and times when you changed them – close database and open it again and it should be fine as cache will clear itself.
Users then just open provided address, click on desired time and day, fill in some details and hit Submit. They’ll receive and email that it is necessary to reply to this email or open provided link and click on button to confirm their registration. It’s just up to you if you want confirm their registration or not, just change email’s text as needed.
For designers there are just few design elements inside:
- pages approved, deleted, emailsent, errorvalues, someonewasquicker – they are used just for display text of particular event which is obvious from their name (hopefully :-))
- page Welcome – this page is the main page which is opened first. It includes description text which you can change as needed and Computed text which is used to generate table with days, times and list of free places. It’s done with two cycles which goes through list of days and times and check how much places are still available and who is registered for each slot.
- form Register – this is used to fill in details about each person and you can change it as you want. Checking of required field is done with $$Return field, which is not ideal, but good enough. In WebQuerySave event is called agent (Register) which’ll send email to people and write document inside database.
- form Setup, Slot – they are used for set up database and user’ll not see them.
- views – you can change them, just leave their alias and don’t change order of first two columns in view Setup and first column in views Slots definition and Slots.
- agents (ApproveWeb) and (DeleteWeb) – they are called from form Register via appropriate buttons and they change status of document and send email to people. No documents are deleted in whole process.
- agent (Register) is called after save of form Register and it checks if space is still available and send email to people
- agent approve – is set up to run after new mail arrives and will change status of particular registration. As it uses field SMTPOriginator to get email address from email it can be used just for email coming via SMTP. If you use it inside LN environment you have to change this part or let people confirm their registration via link in email
- script library Functions – there is just one function inside which replace special tags in email’s texts with real values. In your email’s text you can use following tags: $Day$, $Time$, $Name1$, $Name2$ and $ID$, where the last one represents UNID of registration document.
- style sheet main.css – just basic style sheet used on all places. Change as you need.
That’s it, I’ll be happy if you’ll let me know when you’ll use this database 🙂