ThomC
Posts: 8
|
Posted: 09/29/2010, 7:28 AM |
|
I have a very simple CCS Cold Fusion form attached to a Access database. I am a newbie so I don't know how to add custom CF code. I have 3 fields that need fixed and I want to send an email after the record insert. This is simple easy stuff for a CCS / CF person. We will use GoToMeeting for the session. I can pay by paypal immediately.
1) Date/Time stamp the record
2) Generate a random text student ID
3) Generate a random 4 digit pin
4) Send an email upon record insert
Thom 614-348-3634
(I have a CCS/ PHP project that I will need support on as well)
|
|
|
MaFi
Posts: 49
|
Posted: 09/30/2010, 12:04 AM |
|
Hi Thom,
I am using CCS 2, 3 and 4 with ColdFusion for a long time now.
Your questions are not very difficult to solve:
1.) Insert a hidden field and add as the control source your database column where you want to store the Date/time stamp of the record. Define the Data Type as Date, the desired Format and at Default Value CurrentDateTime. Be sure that you no other field with the same control source.
2.) Insert a hidden field for the student ID and add as the control source your database column where you want to store this ID. Mark this field and switch to Events. Add code by right click the Before Show. Now you can enter your custom code to generate your random text ID, e.G:
<cfset fldRandomStudentID = "whatEver">
3.) Same as 2.) e.g. <cfset fldDigitID = RandRange(1000,9999)>
4.) Mark the Record and switch to events. There right click on After Insert.
Now you can enter the coldfusion code for sending a mail, e.G.
<CFMAIL ...
Feel free to contact me if you need more help.
Martin
|
|
|
|