Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Update database based on UniqueCompletionID?
Last Post 09-28-2009 01:50 PM by Chris Jones. 9 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Chris JonesUser is Offline
wading in the water
wading in the water
Posts:16
Avatar

--
09-28-2009 09:58 AM

    I am using DynamicForms for a registration page.

    1. User fills in information and selects which event they would like to register for on Form #1.  All of the fields on Form #1 are stored as session variables as well as entered into a database table along with the UniqueCompletionID.

    2. When the user clicks 'Submit' on Form #1, they are redirected to an off-site payment handler. The payment handler is restrictive on what I can pass via QueryString, so I have Form #1 sending the UniqueCompletionID to a Session variable.

    3. When the user completes payment on the off-site handler, they are redirected to another off-site PHP page to get away from the 'Security' that the payment handler has imposed.  (For some reason, I can't redirect from the payment handler directly to a DNN page, so I have a simple PHP page running on my local server to do the redirecting back to DNN.  Yes, I know it's convoluted, but that part works.)

    4. When the user is redirected from the PHP page, they are sent to another DynamicForms form (Form #2) that auto-populates fields from the session variables stored from Form #1.  I am using this page as a "Make sure your info is correct" as well as a way to update the user's record in the database with information returned from the payment handler.  This is where the problem is occuring.

    Form #2 loads correctly with all of the relevant information auto-populated from the session variables - including the UniqueCompletionID from Form #1.  When the user clicks 'Submit' on Form #2, I would like to update the database fields based on the record associated with the UniqueCompletionID from Form #1. -> UPDATE MyTable SET blah blah WHERE UniqueCompletionID = $(UniqueCompletionID)

    I think where it's getting hosed up is that, when the user clicks Submit on Form #2, a new UniqueCompletionID is generated which is being used in my update query instead of the label field located on the form.  A way to get around this would be to rename the label field on the form, but I don't know of a way to rename the field and still have it pull the UniqueCompletionID from the session variable.

    I have also tried doing an initial SQL Bind on Form #2 where I retrieve the RecordID (auto-increment field in the database) associated with the UniqueCompletionID of Form #1. -> SELECT RegID FROM MyTable WHERE UniqueCompletionID = $(UniqueCompletionID).  This doesn't work either.

    My hands are tied as far as using a querystring due to the off-site payment handler, so I have to do everything through session variables.

    Any ideas on how to get this to work?

    Sorry for the book-length explanation, but I assume more details are better than fewer details.

    Thanks in advance,

    CJ

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    09-28-2009 11:10 AM
    Hi, since on page DF 2 you are retrieving the $(UniqueCompletionID) as session variable from DF 1, and on DF 2 when you click on submit, it generates a new session variable and therefore your SQL update statement doesn't work, try the following.

    Create a hidden field on DF 2 called OrigUniqueCompID and use client side javascript on page load to set $(OrigUniqueCompID) = $(UniqueCompletionID). Then your SQL update statement would use the $(OrigUniqueCompID) instead. This would not change on submit of DF 2.

    -- David
    Chris JonesUser is Offline
    wading in the water
    wading in the water
    Posts:16
    Avatar

    --
    09-28-2009 11:30 AM

    Thanks for the reply!  I knew there had to be a way to do this, just was missing one piece of it.

    Is this type of code that will do what I want:

    document.getElementById('OriginalUCI').value="<% =Session("UniqueCompletionID") %>";

    I have that in the 'Initial Javascript' field in Module Settings for DF 2.

    Thanks,

    Chris

     

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    09-28-2009 11:37 AM
    No, under Initial Javascript section of Module Configuration, just type in:

    $(OrigUniqueCompID) = $(UniqueCompletionID)
    Chris JonesUser is Offline
    wading in the water
    wading in the water
    Posts:16
    Avatar

    --
    09-28-2009 12:44 PM

    Well, that isn't working for me for some reason.  The update query still wouldn't run, so I tried setting the OrigUniqueCompID field to be a label, and nothing is coming through as a value for the field.

    Any ideas?

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    09-28-2009 12:48 PM
    Hi, can you turn on debug mode and then when you hit submit on the form, can you tell me SQL data is being displayed? You should also set $(OrigUniqueCompID) = $(UniqueCompletionID) on the client side event of the hidden field as well. -- David
    Chris JonesUser is Offline
    wading in the water
    wading in the water
    Posts:16
    Avatar

    --
    09-28-2009 12:56 PM
    ***DYNAMIC FORMS DEBUG MODE ON***
    Version:2.7.4.1

    Client Side Event:document.getElementById('dnn_ctr948_DynamicForms_Label_GUID13ba5f60-6f41-4b8b-9e39-b7b485b44ecfOrigUniqueCompID').value=$(UniqueCompletionID);

    Initial Javascript:document.getElementById('dnn_ctr948_DynamicForms_Label_GUID13ba5f60-6f41-4b8b-9e39-b7b485b44ecfOrigUniqueCompID').value = $(UniqueCompletionID);

    Executing SQL Event
    SQL Query: Update BusSuccessionReg Set [CompName] = '', [FName] = 'test', [LName] = 'test', [Address1] = '', [Address2] = '', [Unit] = '', [City] = '', [State] = '', [Zip] = '', [Phone1] = '', [Phone2] = '', [Email] = 'asdfasdf', [WorkshopLoc] = '-- Select a Workshop Location --', [WorkshopDate] = '', [NumAttendees] = '1', [AttendeeNames] = '', [Comments] = '', [tpgMessage] = '', [tpgAmount] = '', [tpgResponse] = '', [tpgCCLastFour] = '', [tpgCCType] = '', [tpgTranID] = '' Where [UniqueCompletionID] = ''
    *** Ending Debug Mode for Dynamic Forms ***
    Chris JonesUser is Offline
    wading in the water
    wading in the water
    Posts:16
    Avatar

    --
    09-28-2009 12:56 PM
    And here is the Update query I am trying to run:

    Update BusSuccessionReg
    Set
    [CompName] = '$(CompName)',
    [FName] = '$(FName)',
    [LName] = '$(LName)',
    [Address1] = '$(Address1)',
    [Address2] = '$(Address2)',
    [Unit] = '$(Unit)',
    [City] = '$(City)',
    [State] = '$(State)',
    [Zip] = '$(Zip)',
    [Phone1] = '$(Phone1)',
    [Phone2] = '$(Phone2)',
    [Email] = '$(Email)',
    [WorkshopLoc] = '$(WSLoc)',
    [WorkshopDate] = '$(WSDate)',
    [NumAttendees] = '$(NumAttendees)',
    [AttendeeNames] = '$(AttendeeNames)',
    [Comments] = '$(Comments)',
    [tpgMessage] = '$(tpgMessage)',
    [tpgAmount] = '$(tpgAmount)',
    [tpgResponse] = '$(tpgResponse)',
    [tpgCCLastFour] = '$(tpgCCLastFour)',
    [tpgCCType] = '$(tpgCCType)',
    [tpgTranID] = '$(tpgTranID)'
    Where [UniqueCompletionID] = '$(OrigUniqueCompID)'
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    09-28-2009 01:12 PM
    Several more questions:
    1) do you see any data in the SQL table that got inserted on DF page 1 submit?
    2) if you make the OrigiUniqueCompID field a textbox as opposed to hidden field, what value do you see it being populated on page load of DF 2? Also, did you include the shortname field UniqueCompletionID and have it retrieve from session variable for DF 2? -- David
    Chris JonesUser is Offline
    wading in the water
    wading in the water
    Posts:16
    Avatar

    --
    09-28-2009 01:50 PM

    Wow.. I have no clue what I did differently.

    I tried all combinations of having UniqueCompletionID and OrigCompID on the page with 'copying' taking places in different areas but never got it to work.

    I finally went back and deleted all instances of UniqueCompletionID and OrigUniqueCompID in DF2 and recreated them and now it works.

    Thanks again for the time and help!!!!!

    CJ

     

     

    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi