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!

Optionally copying field values
Last Post 06-22-2007 07:35 AM by Chad Nash. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Jim BegleyUser is Offline
wading in the water
wading in the water
Posts:19
Avatar

--
06-21-2007 03:58 PM

    With my clients registration form, we have a business address and optionally a mailing address. We would like to have the ability to copy the contents of "address1", "address 2", "City", "State" and "Zip" to "Maddress1", "Maddress2", "MCity", "MState" and "Mzip" if the binary field "same address" is toggled to yes. 

    Is there a way with the existing version? I would love for it to happen as a client side event, so the user could see that it took place. 

     

    Thanks!

     

    Jim Begley

    Glide Computing 

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    06-22-2007 07:35 AM

    Jim,

    Hi. Great idea, I am sure there is a way to do this but its going to involve a little more work than simply checking a box within the modules settings etc... We have had another client implement something similar though so I am sure it can be done. If we do discover a way to later add this as a feature we might implement it as a client side event where a checkbox can appear that simply allows you to use it as a 'copy' field checkbox and you select which fields to copy to/from if they check or uncheck the box.

    For right now this is what you can do. Ill try and get an example posted but here are the basics (ready for the fun ride? ).

    1. Create all of your registration fields first.

    2. Once you are complete you will want to add an example text to a field or an HTML field type that includes an HTML checkbox. Keep in mind that example text can include HTML so you just need to decide where you want the checkbox.
    The HTML would look something like this (add < and > before and after line below, I couldn't insert it directly into the forum because it actually appears as a checkbox.:

    input type="checkbox" onclick:"javascript(CopyFields();" name="checkbox" value="checkbox"

    3. Modify a file within your Dynamic Registration ascx file. This file is located under:
    DNNDirectory\DesktopModules\Dynamic Registration and is called DynamicRegistration.ascx. Make a backup of the file first to make sure you have it.

    4. Initially, just add some sample javascript code within the file to make sure the checkbox field you added above is firing. Something like this:


    5. Next actually test that its working. I didn't verify this javascript code or anything but its pretty basic. Just add that script tag towards the top of the .ascx file you are modifying.

    6. After you get this far here is what you would do next:
    1. Determine the field names from step 1 (both the field from and the field to) that you wish to copy. I would test with just one field at a time while you get the code to work. For example, if the first field is called 'Address 1' then go to your registration page and click View Source. Do a search for Address 1. Within that you should see the textbox ID. Each textbox/field has its own unique ID. You just need to fine the ID's for the textbox fields you want to copy from and to. I would start with just the first one to make sure you have it right. The ID is going to look something like this:
    "dnn_ctr469_DynamicRegistration_Responses_f976d909-1a8c-4c6b-a104-e30341fb1546"

    7. Finally change your javascript function to copy from field 1 to field 2 (maybe even alert you of field 1 value to make sure you have the correct value).
    So, for example the code would look like this:
    Alert(document.getElementById('dnn_ctr469_DynamicRegistration_Responses_f976d909-1a8c-4c6b-a104-e30341fb1546').value)

    That would provide you with the value of the field in an alert textbox. To copy it you would have something like this:

    document.getElementById('dnn_ctr469_DynamicRegistration_Responses_f976d909-1a8c-4c6b-a104-e30341fb1546').value = document.getElementById('dnn_ctr469_DynamicRegistration_Responses_f976d909-1a8c-4c6b-a104-e305555555').value

    Above example is assuming Address 1 (original) fieldID is:

    dnn_ctr469_DynamicRegistration_Responses_f976d909-1a8c-4c6b-a104-e30341fb1546

    and Address2 fieldID (new field) is:

    dnn_ctr469_DynamicRegistration_Responses_f976d909-1a8c-4c6b-a104-e305555555



    Thats the basics. Not sure how familiar you are with javascript but if you break down what you are doing its pretty simple. Just getting the right ID's might be troublesome because you have to view source and get them etc... When it comes down to the actual code its really only a few lines to copy from one to the other. You could get fancy with the Javascript though to check if the checkbox is unchecked it would clear all of the fields out and so forth.

    Hope you can find this useful.

    -Chad

    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