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!

DR Form Validation – zip code based on country
Last Post 09-11-2009 06:12 AM by Lewis Hill. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Lewis HillUser is Offline
going with the flow
going with the flow
Posts:66
Avatar

--
09-09-2009 12:38 PM

    I am trying to validate a Postal Code. If a user selects United States for their country (this is the default) the PostalCode field would be required. If another country is selected then the Postal Code field would not be required.

    I have enabled custom SQL.
    SQL Query: if ('$(Country)' = 'United States')
    select 0 as IsValid
    else select 1 as IsValid
     
    Validation Error Message: If your address is in the US your Postal Zip Code is required
     
    Client Side Validation and Server Validation are both selected.
     
    If United States is selected than the user can not register even after providing a zip code, any other country the user can register? I have this working in development but after moving to production it is no longer working?
    I must be missing something?
    Lewis
    Lewis HillUser is Offline
    going with the flow
    going with the flow
    Posts:66
    Avatar

    --
    09-09-2009 01:00 PM

    I should have said that I had this working in development -- it is no longer working.

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

    --
    09-09-2009 01:07 PM
    For your particular case, I don't believe SQL validation is a good choice. It's better to have question events instead.
    1) make the Postal Code field "hide until triggered by question event" under Advance Field Options; also make it a required field
    2) go to Question Events, and create an event to display the Postal Code if "United States" is chosen as the country field
    This combination would work much better. -- David
    Lewis HillUser is Offline
    going with the flow
    going with the flow
    Posts:66
    Avatar

    --
    09-09-2009 03:20 PM
    Hi David,
    On the Question Events I do not see where I can set the Display hidden question based on Country=’United States’ just Country or State or Region which could work; however, it looks like a postback is required and then the Postal Code would be visible and required.

    If this is the case, I think I may have to make this a simple required field with some text like (If Postal Code does not apply enter N/A.). Not as feature rich as our marketing department wanted but clean; the form postback after clicking Register may not be acceptable with the decision makers.

    Let me know if I am missing something with the Question Events or you think of another solution that does not require a postback.

    Thanks for all your help… your support is appreciated.
    Lewis
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    09-10-2009 06:55 AM
    HI Lewis, sorry but you are correct. It looks like the DNN Country/Region fields don't work with question event. What you want to do is then instead of using DNN Country/Region fields, turn them to SQL driven combobox instead.
    For your SQL, type in:
    select Text as QuestionOption, Text as QuestionOptionValue from Lists where ListName= 'Region'

    and then you can use question event on this field to display field PostalCode if United States is the chosen country. -- David
    Lewis HillUser is Offline
    going with the flow
    going with the flow
    Posts:66
    Avatar

    --
    09-11-2009 06:12 AM
    Hi David,
    That seems to work fine… Thanks!
    Lewis
    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