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!

How to tie Region field to Country field
Last Post 04-20-2007 01:33 AM by Harry Yeh. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Don ThorpUser is Offline
new to the springs
new to the springs
Posts:1
Avatar

--
01-06-2007 04:09 PM

    I'm trying to implement the same behavior in my registration form as in the built in registration form. Basically when Country is selected (I already have it populating from the List table) I want to restrict the contents of Region to those in the selected country.

     

    I've been through the documentation and based on the example there, I appears that there is no way to accomplish this behavior. I'm current running 2.3.3 (patch from snowcovered)

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    01-08-2007 08:21 AM

    Don,

    Hi. Ok I will admit these steps below seem like a lot of work for what you are trying to accomplish but I did get them to work just now on our www.betasprings.com site under the 'Registration' page. We might look at implementing this in an easier method in the future for all users but in order to make it more dynamic we would prefer to keep other available options open instead of forcing our own method.

    Step 1: Setup your country field
    a. First setup a country field as you did. But we will change the SQL text slightly for this example because we will end up using it differently
    b. Make sure to name your short field name within setup of the country field (i.e. MyCountry)
    c. set the SQL to be:
    select ' - Select Country - ' as QuestionOption, '0' as QuestionOptionValue
    Union All
    select Text as QuestionOption, EntryID as QuestionOptionValue from Lists where ListName= 'Country'

    Step 2: Setup your region field
    a. Set the region field to be SQL as well and the SQL should be something like this:
    b. select Text as QuestionOption, Text as QuestionOptionValue from lists where ListName = 'Region'
    AND ParentID = $(MyCountry)
    c. note that if you short field name of country is something different then "MyCountry" it should be different here as well.

    Step 3: Setup the question event:
    This step is needed so that the country field will 'post back' which is necessary. I suppose you wouldn't have to actually hide the region field for this event but it probably would look cleaner.
    a. Navigate to Question Events, setup a new question event
    b. You have a few options for the event type. For example you could force the question to be hidden if the user selected the first option (which is 'Select Country') or you could select the default value for the question event although this would have little affect on the form and would be there just to make sure this question creates a postback
    c. Set the postback question to be Country
    d. Set the affected question to be Region

    I just tested this on our beta springs site and it seems to be what you need.

    -Chad

    Harry YehUser is Offline
    new to the springs
    new to the springs
    Posts:3
    Avatar

    --
    04-06-2007 05:03 PM
    This solution is good except for the following

    1) Default values - we have to hardcode the database for the country. For example, usa I have to have the default value in the question table to be "221".

    2) I would like to have the Region as California, but when I set the default value of 221 in the US, the form onload does not generate the proper region

    Please advise on how to fix this or make it work. Ideally if we can modify without changing source code, that is the best.
    Ethan ErkelUser is Offline
    skipping stones
    skipping stones
    Posts:7
    Avatar

    --
    04-07-2007 10:47 AM

    I'm having trouble with this approach. I need to know if this is workable, or if I need to role back to a simpler approach.

     

    Basically, I've got my country and region fields set as suggested, I've setup the Question Event to show the region field when a country is selected. Here are my problems:

    1. When a country is selected the region field doesn't appear (I've played with this a lot, and I don't think it is a settings issue).
    2. In the question events interface, I cannot choose the country that should cause the region field to appear (it just shows the first row, but the drop-down is disabled).
    3. Even if I get these issues working, I'm guessing that the region field will be hidden for updates, unless the user selects a different country to trigger the question event???

    If I'm missing something, I would love to know about it. I tried to access the example on the BetaSprings.com site, but the registration form is showing errors.

     

    If this isn't doable, then I'll roll back to a simpler method.

     

    Thanks,

     

    Ethan

    Harry YehUser is Offline
    new to the springs
    new to the springs
    Posts:3
    Avatar

    --
    04-09-2007 08:53 AM
    ALso the problem with this method is that it doesn't work well with the DNN Integration when you try to integrate the country fields with the Region fields
    Harry YehUser is Offline
    new to the springs
    new to the springs
    Posts:3
    Avatar

    --
    04-20-2007 01:33 AM
    I have the solution and this works with DNN Integration and is a much cleaner solution, since the values of the country aren't stored as integers in the Userprofile DNN Table, we should be using the Text.

    For the Country

    select '' as QuestionOption, '' as QuestionOptionValue
    Union All
    select Text as QuestionOption, Text as QuestionOptionValue from Lists where ListName= 'Country'
    Order By QuestionOption

    For the Region
    select Text as QuestionOption, Text as QuestionOptionValue from lists where ListName = 'Region'
    AND [ParentID] = (select EntryID from Lists where Text = '$(Country)')
    Order By Text
    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