using ColdFusion with authorize.net

ColdFusion 9
MS SQL Server 2012
authorize.net API

In brief: I need to populate an authorize.net payment page using information from a form that is processed in coldfusion

Details: I need to do something fairly simple -- or, I am told it is simple. =) Here are the steps the client (NNVAWI) wants to happen:

1) A user fills out and submits a conference registration form; her information is processed and is put into a data table (good -- this part is done)

2) After she submits the form, she sees the authorize.net payment page where she pays conference registration fees

3) Client would like the authorize.net payment page to display the information (name, address, payment amount, and so on) that the user already typed in the ColdFusion form

Apparently the cfhttp tag is used for this, so I did some reading up on it: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7ffc.html

Cool! I use CFHTTP to send an HTTP request to https://test.authorize.net/gateway/transact.dll

I downloaded some sample code from authorize.net -- it is given below.

Here is where I get confused.

1) How do I connect my conference registration page at http://nnvawi.org/register.cfm to this authorize.net code, below?

2) I would like the registrahttp://nnvawi.org/register.cfm, then go to the authorize.net payment page and see all of her contact information, and the conference fee that she selected, already populated in the payment fields.

Is this possible? Has anyone worked with the authorize.net API before?<br>

Thank you as always for your advice.

Eric

<cfsetting enablecfoutputonly="true">
<cfoutput>
<!--
This sample code is designed to connect to Authorize.net using the AIM method.
For API documentation or additional sample code, please visit:
http://developer.authorize.net
-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  "http://www.w3.org/TR/html4/loose.dtd">
<HTML lang='en'>
<HEAD>
	<TITLE> Sample AIM Implementation </TITLE>
</HEAD>
<BODY>
<P> This sample code is designed to generate a post using Authorize.net's
Advanced Integration Method (AIM) and display the results of this post to
the screen. </P>
<P> For details on how this is accomplished, please review the readme file,
the comments in the sample code, and the Authorize.net AIM API documentation
found at http://developer.authorize.net </P>
<HR />

</cfoutput>
<!--- ColdFusion's cfhttp object is specifically designed to create a post,
and retrieve the results.  Those results are accessed in cfhttp.filecontent --->
<!--- By default, this sample code is designed to post to our test server
for developer accounts: https://test.authorize.net/gateway/transact.dll
for real accounts (even in test mode), please make sure that you are\posting to: https://secure.authorize.net/gateway/transact.dll --->
<cfhttp method="Post" url="https://test.authorize.net/gateway/transact.dll">
	<!--- the API Login ID and Transaction Key must be replaced with valid values --->
	<cfhttpparam type="Formfield" name="x_login" value="API_LOGIN_ID">
	<cfhttpparam type="Formfield" name="x_tran_key" value="TRANSACTION_KEY">
   
	<cfhttpparam type="Formfield" name="x_delim_data" value="TRUE">
	<cfhttpparam type="Formfield" name="x_delim_char" value="|">
	<cfhttpparam type="Formfield" name="x_relay_response" value="FALSE">

	<cfhttpparam type="Formfield" name="x_type" value="AUTH_CAPTURE">
	<cfhttpparam type="Formfield" name="x_method" value="CC">
	<cfhttpparam type="Formfield" name="x_card_num" value="4111111111111111">
	<cfhttpparam type="Formfield" name="x_exp_date" value="0115">

	<cfhttpparam type="Formfield" name="x_amount" value="19.99">
	<cfhttpparam type="Formfield" name="x_description" value="Sample Transaction">

	<cfhttpparam type="Formfield" name="x_first_name" value="John">
	<cfhttpparam type="Formfield" name="x_last_name" value="Doe">
	<cfhttpparam type="Formfield" name="x_address" value="1234 Street">
	<cfhttpparam type="Formfield" name="x_state" value="WA">
	<cfhttpparam type="Formfield" name="x_zip" value="98004">
	<!--- Additional fields can be added here as outlined in the AIM integration
	guide at: http://developer.authorize.net --->	
	<!--- The following fields show an example of how to include line item details, they are commented out by default.
	<cfhttpparam type="Formfield" name="x_line_item" value="item1<|>golf balls<|><|>2<|>18.95<|>Y">
	<cfhttpparam type="Formfield" name="x_line_item" value="item2<|>golf bag<|>Wilson golf carry bag, red<|>1<|>39.99<|>Y">
	<cfhttpparam type="Formfield" name="x_line_item" value="item3<|>book<|>Golf for Dummies<|>1<|>21.99<|>Y">
	--->
</cfhttp>

<!--- Because coldfusion's ListToArray object ignores empty fields, we must
put a space in all empty fields to make sure that they are not skipped --->
<cfset post_response=Replace(cfhttp.filecontent,"||","| |", "all")>
<!--- the same command is run twice, because the first time it only adjusts
every other empty field --->
<cfset post_response=Replace(post_response,"||","| |", "all")>

<!--- now the ListToArray method can be used without skipping fields --->
<cfset response_array=ListToArray(post_response, "|")>

<!--- the results are output to the screen in the form of an html numbered list. --->
<cfoutput>
<OL>
<cfloop index="i" from="1" to="#arrayLen(response_array)#">
	<LI>#response_array[i]# &nbsp;</LI>
</cfloop>
</OL>
<!--- individual elements of the array could be accessed to read certain
response fields.  For example, response_array[1] would return the Response
Code, response_array[3] would return the Response Reason Code.
For a list of response fields, please review the AIM Implementation Guide --->

</BODY>
</HTML>
</cfoutput>

Open in new window

LVL 3
Eric BourlandAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dgrafxCommented:
Hi Eric
The AuthNet code you have (the cfhttp) goes on the form action page.
You would have your customer fill out and "look at" their info before this page.
Then on final submit this code is called that will return status messages and or errors.

good luck
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Eric BourlandAuthor Commented:
I'll give this a try tomorrow. Ran out of time today. Thank you for this reply -- it gives me some perspective.

I'll follow up with something tomorrow. Take care.

Eric
0
Gurpreet Singh RandhawaWeb DeveloperCommented:
i wil provide you code today evening for authorize.net,

i had hard time working on it, so you can just do a copy/paste and bang you are on
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Eric BourlandAuthor Commented:
Dear randhawa,

I really appreciate your assistance as always.

I've been working on this too but have been getting a number of errors. I was going to try to post something after I could at least get the authorize.net form to display.

Thank you as always.

Eric
0
dgrafxCommented:
what do you mean "get the authorize.net form to display"?
as i said earlier this code you have is not something that displays - it is on the action page.

you know how when you have a form:
<form action="actionpage.cfm" method="post">
name: <input type="text" name="cname"><br>
email: <input type="text" name="email"></br>
<input type="submit" value="Submit">
</form>
then on the action page is code that is waiting for form variables - right?
the cfhttp code is waiting for form variables

sorry that i'm rushed for time and can't post some sample code - but you have some sample code ...
and sorry that i don't have time to explain it better ...

if you are still in need later on I will try and help - good luck
0
Eric BourlandAuthor Commented:
Hi friends.

I got caught up in another urgent task. My apologies.

>>>you know how when you have a form:
<form action="actionpage.cfm" method="post">
name: <input type="text" name="cname"><br>
email: <input type="text" name="email"></br>
<input type="submit" value="Submit">
</form>
then on the action page is code that is waiting for form variables - right?
the cfhttp code is waiting for form variables

That makes sense!

I will come back here with a result ASAP -- I hope, this evening.

Thank you again. Hope your day is going great.

Eric
0
Eric BourlandAuthor Commented:
Hi. Sorry to get back here so late. Putting out several fires. I can poke my head above the smoldering ashes now.

>>>you know how when you have a form:
<form action="actionpage.cfm" method="post">
name: <input type="text" name="cname"><br>
email: <input type="text" name="email"></br>
<input type="submit" value="Submit">
</form>

Makes sense. However, my form simply processes, and then goes to a "Thank you" page that says: "Thank you. Our staff will review your application and respond to you."

The form page itself processes the data and populates the database.

I attach the form, below, with apologies for its considerable length. I'll try to abridge it before I post.

It sounds like I need to direct the form to an action page -- in addition to displaying the Thank You page.

I will think about and work on this. All of the comments above have been very helpful. I'll come back here ASAP -- I hope this same afternoon (I am in DC, on EST).

Thank you again. =)

Eric

<!-----
Name:        Register.cfm
Author:      EB, _agx_
Description: add, update organization registrants
Created:     July 2014
Revised: July 2014
ColdFusion Version 9
MS SQL Server 2012
----->

<!--- set a default value "" for RegisterID in scope URL --->
<cfparam name="url.RegisterID" default="">

<!--- define the RegisterID in scope FORM, then set form.RegisterID equal to the RegisterID passed in the URL --->
<cfparam name="form.RegisterID" default="#url.RegisterID#">

<!--- set default values for other user-editable fields --->
<cfparam name="form.Title" default="">
<cfparam name="form.FirstName" default="">
<cfparam name="form.MiddleInitial" default="">
<cfparam name="form.LastName" default="">
<cfparam name="form.Credentials" default="">
<cfparam name="form.Organization" default="">
<cfparam name="form.Address" default="">
<cfparam name="form.City" default="">
<cfparam name="form.State" default="">
<cfparam name="form.ZIP" default="">
<cfparam name="form.Country" default="">
<cfparam name="form.TelephoneHome" default="">
<cfparam name="form.TelephoneWork" default="">
<cfparam name="form.TelephoneMobile" default="">
<cfparam name="form.FAX" default="">
<cfparam name="form.UserEmail" default="">
<cfparam name="form.AltUserEmail" default="">
<cfparam name="form.SpecialRequirements" default="">
<cfparam name="form.DateCreated" default="">
<cfparam name="form.DateModified" default="">


     <!--- set default values for radio buttons --->
     <cfparam name="form.ConferenceFeeType" default="">
                                          

<!--- in user-editable fields, set up protection against XSS  --->
    <cfloop collection="#FORM#" item="field">
      <cfset FORM[ field ] = ReReplaceNoCase (FORM[ field ], "<script.*?>.*?</script>", "", "all")>
    </cfloop>



		   
<!---- begin CFTRY; catch errors ---->
<cftry>  
 
<!---- populate cftry with error message ---->
<cfset variables.error = ""> 
 
<!--- BEGIN: Save action --->

<!--- begin form.doSave --->

<cfif IsDefined("FORM.doSave")>


 <!--- in this query select NOTHING from table #request.RegisterTable#, and simply check if UserEmail exists --->
 
 <cfquery datasource="#APPLICATION.dataSource#" name="CheckUserEmail">
  SELECT 'Nothing' FROM #request.RegisterTable#
  WHERE UserEmail = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#form.UserEmail#">
  AND  RegisterID <> <cfqueryparam cfsqltype="cf_sql_integer" value="#val(form.RegisterID)#">

  </cfquery>

  
   <!--- if UserEmail exists, display error; refuse record insert --->
   
	<cfif CheckUserEmail.recordcount GT 0>
		   <cfthrow message="That email address is already in use. Did you already register for the NNVAWI conference? Please contact NNVAWI at info@nnvawi.org.">
           
	</cfif>


<cftransaction>



<!--- query to insert new record into registration table --->
			<cfquery name="InsertPage" datasource="#application.datasource#" result="newRegistrant">
				 INSERT INTO #REQUEST.RegisterTable#
     					(
Title
,FirstName
,MiddleInitial
,LastName
,Credentials
,Organization
,Address
,City
,State
,ZIP
,Country
,TelephoneHome
,TelephoneWork
,TelephoneMobile
,FAX
,UserEmail
,AltUserEmail
,SpecialRequirements
,ConferenceFeeType
,DateCreated
                        )
                        
                        
			     VALUES(
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.Title,50))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.FirstName,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.MiddleInitial,5))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.LastName,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.Credentials,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.Organization,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.Address,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.City,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.State,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.ZIP,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.Country,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.TelephoneHome,25))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.TelephoneWork,25))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.TelephoneMobile,25))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.FAX,25))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.UserEmail,128))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.AltUserEmail,128))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.SpecialRequirements,255))#">,
<cfqueryparam cfsqltype="cf_sql_integer" value="#val(form.ConferenceFeeTypeID)#">,
<cfqueryparam cfsqltype="cf_sql_timestamp" value="#now()#">
)         
					</cfquery>
        


   <cfmail
      from="#form.UserEmail#"
      to="valid email address"
      subject="New #REQUEST.companyName# conference registration ready for your review as of #DateFormat(Now())#, #TimeFormat(Now())#"
      SpoolEnable="Yes">Greetings, #REQUEST.companyName#. There is a new #REQUEST.companyName# conference registration ready for your review. Please check the #REQUEST.companyName# registration control panel.</cfmail>

    </cftransaction>
        
                   
<!--- use the result attribute value (newRegistrant) to set form field value --->
      <cfset form.RegisterID = newRegistrant.IDENTITYCOL>
      
  
              
<!--- END queries to update or insert database records ---> 



       <!--- done? relocate --->

<cflocation url="/thankyouConference.cfm" addtoken="no">

             
<!--- END: Save action --->

<!--- END form.doSave --->
                    </cfif>
       
<!--- END queries to update or insert database records ---> 
        

<!--- this CFCATCH will trap errors -- the ones you threw or just regular database issues --->
            <cfcatch type="Any">
                 <cfset variables.error = cfcatch.message>
                 <cfrethrow>
            </cfcatch>

<!--- END CFTRY --->  
			</cftry>
       
       
       
<cfinclude template="/SiteHeader.cfm">


<!--- if there an error, display error in readable form --->

<cfif len(variables.error)> 
	  <cfoutput>
	    <div class="errorbox">#variables.error#</div>
	    </cfoutput>
   
   <br />

             <div class="center">
               <input type="button" value="Go Back" onclick="history.go(-1)" />
</div>
             
             <cfabort>
</cfif>




<!--- form begins here --->
<form method="post" enctype="multipart/form-data" name="ebwebworkForm" class="ebwebworkForm">
                
 

                
 
 <!--- Embed RegisterID (PK) to assign a value to it --->
 <cfoutput>
<input type="hidden" name="RegisterID" value="#form.RegisterID#" />
   </cfoutput>





  <ul>
        <li>
<legend><h2>Register</h2></legend>
      </li>
      


<p><span class="red"><i class="icon-asterisk"></i></span> <em>indicates a required field.</em></p>

<li>
  <label for="Title"><h3>Title (Ms., Mr., Dr. etc.):</h3></label>



<input type="text" name="Title" placeholder="Title" value="" maxlength="255" tabindex="1" size="70" autofocus="true" />
               
</li>
                              
<li>
  <label for="FirstName"><h3>First Name:</h3></label>


<input type="text" name="FirstName" placeholder="First Name" value="" maxlength="255" tabindex="2" size="70" required="yes" />
        <span class="form_hint">Enter First Name</span> 
               
</li>


.... more form fields ....


<h2>Conference Fees</h2>


<cfquery name="getConferenceTypes" datasource="#application.datasource#"> 
    SELECT ConferenceFeeTypeID, ConferenceFeeTitle, Fee
    FROM ConferenceFeeType
</cfquery>

<table width="40%" summary="Conference Fee Schedule for NNVAWI Conference, April 9 - 11, 2015">
  <caption>
    <h3>Conference Fees</h3>
  </caption>

<cfloop query="getConferenceTypes">
<cfoutput>
      <tr>
    <td>#getConferenceTypes.ConferenceFeeTitle#</td>
    <td>#getConferenceTypes.Fee#</td>
	<td><input type="radio" name="ConferenceFeeTypeID" value="#getConferenceTypes.ConferenceFeeTypeID#" class="border0"></td>
     </tr>
</cfoutput>
</cfloop>                
</table>


... submit button .....

    <li>
<div class="submitButton">
   <cfoutput>  
   <button name="doSave" type="submit" class="green" tabindex="19">Register for #REQUEST.companyName# Conference</button>
   </cfoutput>
</div>  
</li>
    
    
    </ul>

</form>

<p class="center"><span class="red"><i class="icon-asterisk"></i></span> <em>An NNVAWI administrator will review and confirm your registration.</em></p>

        <cfinclude template="/SiteFooter.cfm">

Open in new window

0
Eric BourlandAuthor Commented:
Hi friends.

Well, I stared at this a lot over the weekend, and looked around for examples. I signed up on the authorize.net developer forum. But I am not quite clear how I can get the sample code I have noted above to integrate with the register form.

Do I need to re-think how my form is processed? Currently, the action of the form simply inserts data into a table, the cflocates to a simple thank you page.

I believe I need to take away the cfrelocate and the thank you page, and instead do something with this cfhttp code, below.

I am just not clear yet what this looks like, and obviously I am missing a crucial, big concept here.

Thank you for any help. I really appreciate the helpful comments that have already been posted.

Eric

<!-----
Name:        Register.cfm
Author:      EB, _agx_
Description: add, update organization registrants
Created:     July 2014
Revised: July 2014
ColdFusion Version 9
MS SQL Server 2012
----->

<!--- set a default value "" for RegisterID in scope URL --->
<cfparam name="url.RegisterID" default="">

<!--- define the RegisterID in scope FORM, then set form.RegisterID equal to the RegisterID passed in the URL --->
<cfparam name="form.RegisterID" default="#url.RegisterID#">

<!--- set default values for other user-editable fields --->
<cfparam name="form.Title" default="">
<cfparam name="form.FirstName" default="">
<cfparam name="form.MiddleInitial" default="">
<cfparam name="form.LastName" default="">
<cfparam name="form.Credentials" default="">
<cfparam name="form.Organization" default="">
<cfparam name="form.Address" default="">
<cfparam name="form.City" default="">
<cfparam name="form.State" default="">
<cfparam name="form.ZIP" default="">
<cfparam name="form.Country" default="">
<cfparam name="form.TelephoneHome" default="">
<cfparam name="form.TelephoneWork" default="">
<cfparam name="form.TelephoneMobile" default="">
<cfparam name="form.FAX" default="">
<cfparam name="form.UserEmail" default="">
<cfparam name="form.AltUserEmail" default="">
<cfparam name="form.SpecialRequirements" default="">
<cfparam name="form.DateCreated" default="">
<cfparam name="form.DateModified" default="">


     <!--- set default values for radio buttons --->
     <cfparam name="form.ConferenceFeeType" default="">
                                          

<!--- in user-editable fields, set up protection against XSS  --->
    <cfloop collection="#FORM#" item="field">
      <cfset FORM[ field ] = ReReplaceNoCase (FORM[ field ], "<script.*?>.*?</script>", "", "all")>
    </cfloop>



		   
<!---- begin CFTRY; catch errors ---->
<cftry>  
 
<!---- populate cftry with error message ---->
<cfset variables.error = ""> 
 
<!--- BEGIN: Save action --->

<!--- begin form.doSave --->

<cfif IsDefined("FORM.doSave")>


 <!--- in this query select NOTHING from table #request.RegisterTable#, and simply check if UserEmail exists --->
 
 <cfquery datasource="#APPLICATION.dataSource#" name="CheckUserEmail">
  SELECT 'Nothing' FROM #request.RegisterTable#
  WHERE UserEmail = <CFQUERYPARAM CFSQLTYPE="cf_sql_varchar" VALUE="#form.UserEmail#">
  AND  RegisterID <> <cfqueryparam cfsqltype="cf_sql_integer" value="#val(form.RegisterID)#">

  </cfquery>

  
   <!--- if UserEmail exists, display error; refuse record insert --->
   
	<cfif CheckUserEmail.recordcount GT 0>
		   <cfthrow message="That email address is already in use. Did you already register for the NNVAWI conference? Please contact NNVAWI at info@nnvawi.org.">
           
	</cfif>


<cftransaction>



<!--- query to insert new record into registration table --->
			<cfquery name="InsertPage" datasource="#application.datasource#" result="newRegistrant">
				 INSERT INTO #REQUEST.RegisterTable#
     					(
Title
,FirstName
,MiddleInitial
,LastName
,Credentials
,Organization
,Address
,City
,State
,ZIP
,Country
,TelephoneHome
,TelephoneWork
,TelephoneMobile
,FAX
,UserEmail
,AltUserEmail
,SpecialRequirements
,ConferenceFeeType
,DateCreated
                        )
                        
                        
			     VALUES(
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.Title,50))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.FirstName,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.MiddleInitial,5))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.LastName,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.Credentials,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.Organization,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.Address,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.City,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.State,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.ZIP,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.Country,255))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.TelephoneHome,25))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.TelephoneWork,25))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.TelephoneMobile,25))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.FAX,25))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.UserEmail,128))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.AltUserEmail,128))#">,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#Trim(Left(form.SpecialRequirements,255))#">,
<cfqueryparam cfsqltype="cf_sql_integer" value="#val(form.ConferenceFeeTypeID)#">,
<cfqueryparam cfsqltype="cf_sql_timestamp" value="#now()#">
)         
					</cfquery>
        


   <cfmail
      from="#form.UserEmail#"
      to="valid email address"
      subject="New #REQUEST.companyName# conference registration ready for your review as of #DateFormat(Now())#, #TimeFormat(Now())#"
      SpoolEnable="Yes">Greetings, #REQUEST.companyName#. There is a new #REQUEST.companyName# conference registration ready for your review. Please check the #REQUEST.companyName# registration control panel.</cfmail>

    </cftransaction>
        
                   
<!--- use the result attribute value (newRegistrant) to set form field value --->
      <cfset form.RegisterID = newRegistrant.IDENTITYCOL>
      
  
              
<!--- END queries to update or insert database records ---> 



       <!--- done? relocate --->

<cflocation url="/thankyouConference.cfm" addtoken="no">

             
<!--- END: Save action --->

<!--- END form.doSave --->
                    </cfif>
       
<!--- END queries to update or insert database records ---> 
        

<!--- this CFCATCH will trap errors -- the ones you threw or just regular database issues --->
            <cfcatch type="Any">
                 <cfset variables.error = cfcatch.message>
                 <cfrethrow>
            </cfcatch>

<!--- END CFTRY --->  
			</cftry>
       
       
       
<cfinclude template="/SiteHeader.cfm">


<!--- if there an error, display error in readable form --->

<cfif len(variables.error)> 
	  <cfoutput>
	    <div class="errorbox">#variables.error#</div>
	    </cfoutput>
   
   <br />

             <div class="center">
               <input type="button" value="Go Back" onclick="history.go(-1)" />
</div>
             
             <cfabort>
</cfif>




<!--- form begins here --->
<form method="post" enctype="multipart/form-data" name="ebwebworkForm" class="ebwebworkForm">
                
 

                
 
 <!--- Embed RegisterID (PK) to assign a value to it --->
 <cfoutput>
<input type="hidden" name="RegisterID" value="#form.RegisterID#" />
   </cfoutput>





  <ul>
        <li>
<legend><h2>Register</h2></legend>
      </li>
      


<p><span class="red"><i class="icon-asterisk"></i></span> <em>indicates a required field.</em></p>

<li>
  <label for="Title"><h3>Title (Ms., Mr., Dr. etc.):</h3></label>



<input type="text" name="Title" placeholder="Title" value="" maxlength="255" tabindex="1" size="70" autofocus="true" />
               
</li>
                              
<li>
  <label for="FirstName"><h3>First Name:</h3></label>


<input type="text" name="FirstName" placeholder="First Name" value="" maxlength="255" tabindex="2" size="70" required="yes" />
        <span class="form_hint">Enter First Name</span> 
               
</li>


.... more form fields ....


<h2>Conference Fees</h2>


<cfquery name="getConferenceTypes" datasource="#application.datasource#"> 
    SELECT ConferenceFeeTypeID, ConferenceFeeTitle, Fee
    FROM ConferenceFeeType
</cfquery>

<table width="40%" summary="Conference Fee Schedule for NNVAWI Conference, April 9 - 11, 2015">
  <caption>
    <h3>Conference Fees</h3>
  </caption>

<cfloop query="getConferenceTypes">
<cfoutput>
      <tr>
    <td>#getConferenceTypes.ConferenceFeeTitle#</td>
    <td>#getConferenceTypes.Fee#</td>
	<td><input type="radio" name="ConferenceFeeTypeID" value="#getConferenceTypes.ConferenceFeeTypeID#" class="border0"></td>
     </tr>
</cfoutput>
</cfloop>                
</table>


... submit button .....

    <li>
<div class="submitButton">
   <cfoutput>  
   <button name="doSave" type="submit" class="green" tabindex="19">Register for #REQUEST.companyName# Conference</button>
   </cfoutput>
</div>  
</li>
    
    
    </ul>

</form>


        <cfinclude template="/SiteFooter.cfm">

Open in new window

0
dgrafxCommented:
Eric
I have to say again:

1. you have your form page that the user fills out
they then submit that form to the action page

2. the action page is the page where the cfhttp code goes getting values from the form that was submitted.

It seems that what you are sticking on is that you want a 1.5 step - that's ok - just create it.
1.5 (which goes after 1 and before 2) this page would take the form vars from step 1 (form page) and insert them to DB and when finished would display them for the user to read over and check for errors.
If everything ok then they click submit which goes to your #2 page which uses the cfhttp code.
If everything not ok then they can go back to form page to make changes.

hope that helps ...
0
Eric BourlandAuthor Commented:
That does help, and I have found some other resources that I have been reading. =) I'll work on this some more tonight and tomorrow, and I will let you know what result I get.

Thank you again, and thank you for your patience while I work on this. =)

Have a great evening.

Eric
0
Eric BourlandAuthor Commented:
Hi. I am going to close this question for now, since I don't think I can come back to it in a timely way, and I want to respect people's time. I really appreciate the advice I got. I might reopen this question when I have more code to show.

Thanks very much, and take care. =)

Eric
0
dgrafxCommented:
ok Eric - I appreciate the points!
Just post again when you have more questions.

and good luck ...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.