Place this function in say the top of the page then use the
function anywhere in the page. You could also create it in the
request scope and use it just there or make it permament. Your
choice.
<!------------------------------------------------------------------>
<!--- Return string with initial letter capitalized.
--->
<!------------------------------------------------------------------>
<cfscript>
function capitalizeFirstLetter(word) {
return UCase(Mid(word,1, 1)) & LCase(mid(word, 2,
len(word)));
}
</cfscript>
<cfquery name="Insert datasource="Users">
INSERT INTO TempUsers
(Name, firstName, Surname, EmailAddress, Password)
VALUES
('#capitalizeFirstLetter(form.FirstName#)',
'#capitalizeFirstLetter(form.Surname)#', '#form.EmailAddress#',
'#form.password#')
</cfquery>