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!

Copy one fields value to another on link click
Last Post 10-26-2009 09:20 AM by David To. 9 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Jeff ClaytonUser is Offline
wading in the water
wading in the water
Posts:27
Avatar

--
10-21-2009 06:01 AM

    I'd like to add a link to a page that takes the entered value of $(Name1) and copies it to $(Name2) on link click - the purpose would be similar to a "copy shipping address to billing address" type of feature.

    What is the easiest way to do this? I know it needs javascript, but not sure where to start and I couldn't find a demo on the site that covers this.

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

    --
    10-21-2009 08:01 AM
    Hi, you could perhaps right click on the "link" and choose option to view element properties to get the element property ID. Then use this ID as your javascript to set $(Name2) to equal $(Name1) just like if it was a checkbox field. This may work and it may not work since I've never had this scenario before. -- David
    Jeff ClaytonUser is Offline
    wading in the water
    wading in the water
    Posts:27
    Avatar

    --
    10-21-2009 09:09 AM

    Thanks for the reply. If it were a checkbox instead of a link, I’m not even sure how I would do it. So maybe that would be a good starting point. I’m clueless with JavaScript but strong with Dynamic Forms and SQL.

    My exact scenario is this: I am setting up a carpool registration form where there are a series of the exact same fields for each passenger. The user specifies up front that there are x number of passengers and then the appropriate fields are hidden or displayed using a question event. The users enters information for the first passenger and in most cases, the passengers will all have the same information for all of their employment-related fields because they work together 80% of the time.

    So with that in mind, I’m trying to set it up so there is a link at the beginning of each passenger’s Employment Info section that says “copy Employment Info from previous passenger” and when its clicked, it will take all the values entered in the fields for the previous passenger (5 fields total – all textboxes) and duplicate the same values in the same fields for the new passenger so that they don’t have to retype it.

    I know I could setup a checkbox that says "same info as above" adn then disable the appropriate fields using a question event when they click a checkbox to indicate its the same, but then if there is even a slight variation in  1 of the 5 fields such as (office phone number) then they wouldn’t be able to use it. So the method I’m describing above would be a similar concept to what Dynamic Forms does in the control panel when choose to add a new field and have the option to choose a field to copy from and then the defaults are all set. I understand what I am trying to do is different because I want to pull it from values that were entered only on the screen and not yet saved to the database. So my lack of JavaScript skills is preventing me from figuring this out.

    If you could point me in the right direction of what this JavaScript would look like and where each part would go, that would be immensely helpful. Or if you say this would be an insane amount of JavaScript to write for the tradeoff of what I’m trying to implement then I just have to disable the fields on a question event. Maybe there’s even another way to use a question event to do this? The way I'm trying to accomplish it with a copy type function seems like the most user-friendly way to go in this scenario, so I'd rather not disable fields.

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

    --
    10-21-2009 09:50 AM
    Hi, can you export your form (with dummy values and not SQL driven) onto www.betasprings.com (username: host, password: dnnost) and send us the URL/TABID so we can take a look if it's easy to accomplish with javascript. Include the "link" that you want to click on as well. -- David
    Jeff ClaytonUser is Offline
    wading in the water
    wading in the water
    Posts:27
    Avatar

    --
    10-21-2009 10:28 AM

    Thanks for loking into it. Its on betasprings here:

    http://Beta-Springs.com/Dynamic-For...fault.aspx

    There's no sql and I don't think you'll need any dummy values. When you get to the page, accept the terms and scroll to the second passenger's info, you'll see I made the link with a yellow background and some text of what I would hope the link would do  (or a button would be okay).

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

    --
    10-21-2009 01:40 PM
    I will get back with you on this tomorrow morning. -- david
    Jeff ClaytonUser is Offline
    wading in the water
    wading in the water
    Posts:27
    Avatar

    --
    10-23-2009 06:07 AM

    David, Any luck with this?

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

    --
    10-23-2009 06:22 AM
    Not yet. I'll look into it some more today. -- David
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    10-26-2009 08:11 AM
    Hi Jeff, I'm stll not having luck on this yet. -- David
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    10-26-2009 09:20 AM
    Hi Jeff, after more researching, it's possible to do this but would be very tedious. Since the DF tokens cannot be replaced in a text/html field, you can't do the following:

    copy from previous passenger

    I'd like the link above to copy whatever you enter for the carpool Coordinator's Employer name, Worksite Address, Work Start time, Work End Time and Work Phone Number into the same fields in the Carpooler #2 section.



    Instead of $(EmployerName2)=$(EmployerName) for example, you would need to use View source in your browser to get the actual elementID and place them here instead. Since you have a lot of elements, this would be very cumbersome.

    Another option is to use an HTML Button field instead. This way, you can use client side javascript and therefore, use the dynamic forms tokens as opposed to using the HTML element IDS. Hope this helps with what you want to achieve. -- David
    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