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!

Populate hidden field with javascript?
Last Post 09-03-2013 06:25 AM by Ryan Bakerink. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
L PUser is Offline
new to the springs
new to the springs
Posts:1
Avatar

--
08-29-2013 10:10 AM
    Here is what I'm trying to accomplish:

    A visitor comes to the site with 2 querystring parameters (for ad tracking). A cookie gets created with those 2 parameters. They visit a page that has Dynamic Forms on it. 

    If they still have the parameters on the URL, those values get passed to hidden fields on the form.
    OR 
    If they have no parameters on the URL, then the values from the cookie get filled into the hidden fields on the form (if one exists).
    OR
    If no cookie exists and no parameters exist, then keep hidden fields on form blank.

    I was thinking of using Javascript baked into my skins on every page to read the URL, create the cookie, do comparisons, etc...then populate the hidden fields on the form with the correct value...but how do I do that? I don't see any type of id or class (in Firebug) that I can "grab" onto for hidden fields on the form. 


    Version info: 4.10.4.23731 / 6.0.2

    If there is a better way, please let me know. I tried playing with the "Retrieve values from querystring variable for this question" and "Retrieve values from cookie variable for this question"...but how do I introduce logic that says if the querystring exists, use those values instead of the cookie?
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    09-03-2013 06:25 AM
    Hello L P,

    Dynamic Forms assigns ID's and Name's to all form fields. The ID of a Hidden field will contain the short field name. So you can always view the page source and search for the short field name of the question you're looking for.

    The ID's and Name's of a field will contain a GUID, Module ID, and the short field name. So this is quite a large string.

    This method was adapted to ensure that duplicates of HTML Id's and Name's wouldn't be possible.


    Based on your last question:

    "..but how do I introduce logic that says if the querystring exists, use those values instead of the cookie?"

    JavaScript has a multitude of ways to detect Querystring variables, cookie variables, etc.. you'll just need to research how.

    The logic is:

    IF Querystring != ''
    BEGIN
    USE Querystring Value
    END

    ELSE
    BEGIN
    USE Cookie Value
    END


    This is how you can detect a Querystring in a URL using JavaScript:
    1.) http://stackoverflow.com/questions/...javascript
    2.) http://stackoverflow.com/questions/...ent-on-url

    You can build a script and inject this into the Initial JavaScript section of your Dynamic Form.

    Please let me know if you have any questions.

    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