Ready to get started?

Help Files / User Guides

Review the new and improved user guides including instructions on setting up the Dynamic Forms module, explanation of features,  product information, and more!

 

User Guide (PDF)

 

Demonstrations

View Dynamic Forms Demonstrations

Dynamic Forms Video Tutorial

 

Trial Version

Dynamic Forms 3.1 Trial

 

Purchase Dynamic Forms

Dynamic Forms 3.1 w/ Snowcovered


 

License Agreement

Standard Version

Enterprise Edition

 

Recently Viewed...
DNN Modules
   
    |   Register   |   Sunday, March 14, 2010   
You are here:Products  DNN Modules  Dynamic Forms  Dynamic Forms Demonstration 18  


Dynamic Forms






Your total comes to: $0.00





Save      
Dynamic Forms Demonstration 18 - Offering Payment Options to Users using PGateway

 

This is a demonstration of the PGateway feature of Dynamic Forms.   This feature allows for multiple modes of payment available for the user to choose from.   In this demonstration, the choices are PayPal, credit card payment via Authorize.net.  As a third option, we demonstrate how you can also offer users the option to mail a check payment.

 

This demonstration will also showcase the use of calculation to obtain totals, question events to display fields based on user response, and customizing your email completion events based on the payment mode selected.  We will also discuss using the Advanced Wizard to define settings for multiple questions in one step.

 


 Setting PGateway

 

The key element here is the use of PGateway as the short field name for the question that offers the choices.  As you can see in the image below, the question is "Mode of Payment" but the short field name is PGateway.

 

 

 

You can use any verbiage that best suits you to describe the payment options.  However, the option value has to be either PayPal or Authorizenet as you can see in the images below:

 

 

Note that the option value below is Authorizenet and NOT Authorize.net (with no dot):

 

 

 

If you want to offer a "Check in the mail" option, you can use Mail Check as the option value, or any other descriptions you prefer.

 

 


 

 Obtaining Totals

 

For our purposes, we created 2 fields that require the total amount.  The first has a short field name of YourTotal and is a Text/HTML field that gives a more user-friendly approach but also prohibits the user from altering the total amount.  The second total field is the $(Total) which is hidden and is what we use to pass data to the payment gateways. 

 

Remember, though, that the client-side calculations are not set within the total fields.  Instead, this is set in the field that offers the options, in this case, the Products checkbox list.  Using this field, you will find the client-side box under Advanced Field Options as shown in the image below:

 

 

 

Here are the two calculations inserted in the Client side event above:

Total.innerHTML = '<B>Your total comes to:  ' + '$' + CalculateCheckBoxListValues($(Products_FieldID), $(Products_ValueFieldID)) + '</b>';

$(Total) =  CalculateCheckBoxListValues($(Products_FieldID), $(Products_ValueFieldID))

 

Note:  There is an extra step to make the calculations work.  In Module Configuration,  Custom Javascript File, we need to add this to the Initial Javascript:

 

 

 


Creating Question Events

 

A Question Event is an event that occurs while the user is filling out the form BEFORE the submit button is hit.  In this demonstration, questions like Credit Card, Expiration Date and address fields are initially hidden until the credit card payment mode is selected.  These fields were set up with 'Hide until forced visible by question event.'  You will find this setting when you Manage Question under Advanced Field Options.

 

After setting up these questions, it's time to set up your question event.  In this case, we named the question event as Credit Card with the settings you find in this image:

 

 

 

To create your email events, simply go to Completion Events,

 


Completion Events

 

A completion event is an event that occurs AFTER the user hits the submit button.  The most important element in creating your completion events here is making the right choice when selecting the dynamic field and the user response that triggers the event.  In the image below, we are creating an email event that will go off if the user chooses to pay by credit card.

 

 

tip6.gifWould you like to setup your form just as this demonstration is setup? If so simply download this template and copy it to your DNN Portals Home Directory to use the IPORTABLE feature of the module (Select Import Content from the module menu and import the template):

 

Feedback Comments
Records per Page
Page 1 of 1First   Previous   Next   Last   
Sean SYED         4/30/2009 5:17:36 PM
Worked Thank you Candace, It worked well. Submitted By: Sean SYED

Sean SYED         4/30/2009 5:16:47 PM
Worked Thank you Candace, It worked well. Submitted By: Sean SYED

Candace Host Account         4/30/2009 4:01:30 PM
Link to file corrected Hi. Sorry about that. Please try the link again and let me know if the problem persists. Thanks! Submitted By: Candace Host Account

Sean Syed         4/30/2009 1:04:02 AM
I need correct file Can anyone provide the link to the correct file. Thanks in advance. Submitted By: Sean Syed

Robert Scott         1/25/2009 5:07:43 PM
Incorrect Demo Download The download for this demo is DemonstrationretreivingdatafromDynamicForms.zip and not the one for Demo 18. Submitted By: Robert Scott

Feedback





Enter the code shown above in the box below
Send

 
Copyright 2005 - 2010 by Data Springs, Inc.
Contact Us | Terms Of Use | Privacy Statement