Recently Viewed...
    |   Register   |   Wednesday, September 08, 2010   
You are here:Products  DNN Modules  Dynamic Forms  Dynamic Forms Demo 31  Demonstration 31 Part 2  


Demonstration 31 Part 2

 0         5         10


 0         5         10


 0         5         10


 0         5         10



      
Demonstration 31 Part 2

 

Demonstration 31 Part 2

 

Demonstration 31 illustrates how to use multiple pages with forms. This lesson will consist of 3 separate parts, one part per form page. In this demonstration part 2 you will learn how to:

  

   • Use the UniqueCompletionID

   • Use DSParam1 to bounce in between pages on your multiple forms

   • How to go back to a previous page

 

 


Continuing your with your Multiple Forms

 

Part 1.

Create many quesiton fields of type radio button and multiline textboxes. This will be the back bone of Demonstration 31 part 2.

 

Part 2.

Create a hidden field with the name UCID and the shortname UniqueCompletionID. Go to "Advanced Field Options" and check the checkbox labeled "Retrieve values from session variable for this question" and check the checkbox labeled "Pass values of this question to session variable". This will allow the uniqueCompletionID to be passed by session, this is essential if your bouncing back and forth between your multiple forms. If this field isn't present, you would add a completely new record if you hit the back button to go to a previous page. This hidden field's main purpose is to allow you to save/update your data when the form is submitted.

 

Properties of the UniqueCompletionID:

Click to see UniqueCompletionID    

 

Needed checked checkboxes for UniqueCompletionID:

Click to see what needs to be checked

 

 

In order to move forwards and pass the same uniqueCompletionID you will have to assign the value of the uniqueCompletionID to DSParam1. You will go to "Module Configuration -> Custom Javascript File" and look for the multilined textbox labeled "Initial Javascript". Insert the following code:
$(DSParam1) = $(uniqueCompletionID);

 

 

 Assigning uniqueCompletionID to DSParam1

Click to see what needs to be checked

 

 

Create a hidden field named "DSParam1" with the same shortname. Go to "Advanced Field Options" and check the checkbox labeled " Retrieve values from querystring variable for this question". Also check the checkbox labeled "Pass values of this question to querystring variable". By adding this hidden field, the sole purpose is to pass parameters through the URL when bouncing in between forms. For instance: If you click the back button from part 2 of this demonstration, you'll be taken to part 1. Part 1 will have no way of knowing if this is a new form being filled out or if it's an existing form that needs to update the modified information when submitted.

 

Properties of DSParam1:

Click to see DSParam1                            

 

 

Needed Checked Checkboxes for DSParam1:

Click to see what needs to be checked

 

 

Part 3

In order to go back and forth in between forms, you will need to take a couple steps. Firstly, you must add an HTML button and assign the text you would like. Secondly you will have to insert Javascript into the multiline textbox labeled "Client side event" under "Advanced Field Options" of this button. In this Javascript you will be using window.location to account for the action to take when the button is clicked. In order to go back to the previous page you will have to include the tabid of the page your redirecting to. To find the tabid of the page you would like to redirect to, simply go to the page and select a menu, for instance: Module Coniguration or Question Events. Look at the URL and search for tabid/the number of the tab. This is the tabid of the page. Now look below at the images to get an idea of how to implement this concept.

 

Where to find the tabid:

Click to see where to find the tabID

 

 

The Client side event script:

Click to see the needed Javascript

 

You will need to go to the SQL Rendering/Bind in Module Configuration and add the following features:


SQL Rendering/Bind
:

Click to see how to create a table

 

 

Summary of Demonstration 31 Part 2

• You have learned how to use the DSParam1 to navigate back and forth through forms

• You have learned how to move forwards using the value of the uniqueCompletionID

• You have learned how to reference the tabID for your client side event to allow you to go back in your forms

 

This concludes Demonstration 31 Part 2, please continue on to Demonstration 31 Part 3 to learn how to make a results form using SQL Rendering/Bind. If you have any questions or comments please add a comment at the bottom of the Demonstration 31 Part 1 page.

 

 


 

 

To get to part 3 of this demonstration, please fill out this form to continue.

 

 

 

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