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!

Redirect after Submit to an url with form_id
Last Post 08-02-2011 12:20 PM by Ryan Bakerink. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Roel BroersmaUser is Offline
wading in the water
wading in the water
Posts:24
Avatar

--
07-25-2011 10:26 AM

    Hello,

    I am searching for hours.. looked all forums but couldn't find the answer.
    The following is in PSEUDO code:

    1) A user will fill in his firstname and surname on a form.

    2) After submit, a Form Completion Event is fired which does a:
     "INSERT INTO tbl_users (firstname, surname) VALUES ( '$(firstname)', '$(surname)' )

    3) I want to redirect the user to www.mydomain.com/page=$(user_id)


    How do I get the  $(user_id) variable?  Because I need to insert the user first, before I know the ID.

     

    TABLE USERS
    user_id (int, increment, private-key)
    firstname (varchar)
    surname (varchar)

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    07-25-2011 10:41 AM
    Hi Roel,

    Is the user signed in at the time?

    I know that normally you can reference $(UserID) within email events or SQL events but I am not sure you can reference that token within the URL event or general settings redirection URL.

    If that is the case you can always create a hidden field called something like 'MyUserID' and then use a SQL Default with that token. Something like:
    Select '$(MyUserID)' as [DefaultValue]

    You could test with using the SQL default with a textbox. Then choose to have that field set to 'Pass field value via querystring'. You would probably have to name the short field name 'page' to get it to work the way you describe within the thread.

    Thanks!

    -Chad
    Roel BroersmaUser is Offline
    wading in the water
    wading in the water
    Posts:24
    Avatar

    --
    07-25-2011 11:07 AM

    Chad,

    Sorry if I was not clear.  I mean that all code was in PSEUDO code.

    So, the example could also be the following:

    1) A user will fill a form with "date", "product", "quantity".

    2) A form completion event will do a "INSERT INTO tbl_orders date (date, product, quantity) VALUES ('$(date)','$(product)','$(quantity)' )"

    3) A second form completion event which will Redirect the user to:  http://mydomain.com/page.aspx?order...(order_id)


    How can I retrieve the order_id from the Database to put it in the Redirect URL?



    TABLE tbl_orders
    user_id  (int, auto-increment, private-key)
    date  (datetime)
    product  (varchar)
    quantity  (int)

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    08-02-2011 12:20 PM
    Hello Roel,

    There really isn't an easy way to do this in Dynamic Forms. The only thing that I can think to use is the TSQL keyword SCOPE_IDENTITY to grab the last inserted record from the database. The only fault to that is what if multiple users submitted the form at the same time thus inserting at the exact same moment, then there's opportunity for a mix up of order id's.

    Maybe you can use a unique string and insert that into a column for each record just so you have another unique key in the table instead of relying only on the primary key.

    You would be able to easily pass the unique id through the URL if you're generating the unique key on your form and then using it in your SQL Event.

    Let me know if this helps.

    Thanks,

    Ryan
    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