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!

Validation of text field against list
Last Post 04-06-2010 01:34 PM by David To. 8 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Don WoodUser is Offline
skipping stones
skipping stones
Posts:7
Avatar

--
07-21-2007 06:25 AM

    I'm trying to get a form to do a validation against a list of values.

    For example, if the user enters zip code in that matches value in one list, the redirect will go to page A

    if the user enters zip code that matches value in another list, the redirect goes to page B.

    if the user enters a value that does not match value in any list, redirect goes to page C.

    Is this possible with dynamic forms?  Can anyone give me some guidance as to how to accomplish this?

    Thanks in advance,

    Don

    Don WoodUser is Offline
    skipping stones
    skipping stones
    Posts:7
    Avatar

    --
    08-09-2007 12:02 PM
    Do you suppose it is that my question is unclear or it is that the question is clear but nobody knows how to do this?

    Perhaps nobody wants to respond to a newbie?
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    08-10-2007 08:06 AM

    Don,.

    Sorry somehow this post was missed...

    The more I review the request I am not sure this is possible within the current version at least. You can have users be redirected based on a forms value/result but... having that value result be based against a list is going to be troublesome. In the next release there is the ability to calculate values and call javascript functions, its possible that maybe depending on the response (zip code) it could maybe call the javascript function and the javascription function could pre-fill another field (or maybe a hidden field) with a value.

    Is this close to your scenario?
    1. User enters 92104, javascript function is called and based on that zip code it returns 'Southwest' into a hidden field. You then have a redirection function setup to redirect Southwest to a particular page.

    2. USer enters 64015, javascript function is called and based on that zip code it returns 'Midwest' into a hidden field. Same type of completion event is redirected based on the Midwest value.

    The major downside here would be that you would have to have all of the possible zip codes in the javascript function, depending on your implementation this might not be possible.

    Another possibility might be to make this multiple forms. For example:

    Form 1. First Name, Zip Code and set the fields to pass to the querystring variable. The page can redirect to Form 2

    Form 2: Possibly setup a hidden field to retrieve the zip code from querystring variables and then use that parameter within the next query (i.e. Select Text as QuestionOption, Text as QuestionOption Value from yourtable where ZipCode = '$(ZipCodeField)' etc...

    Then have your redirection based on that list?

    -Chad

    david coulterUser is Offline
    skipping stones
    skipping stones
    Posts:13
    Avatar

    --
    03-17-2010 10:59 AM

    We would like to also do something very similar.  Any updates?

    The first form would ask the user their ZIP Code. We would then like to compare the zip code to a list and redirect, on submission, to Form 2a if it is in the master SQL table OR redirect to Form 2b if it is not.

    Is there a way to do this?

     

    david coulterUser is Offline
    skipping stones
    skipping stones
    Posts:13
    Avatar

    --
    03-17-2010 01:21 PM

    Trying to solve the issue above.

     

    We attempted to use a Question Event to update another Text field with a simple 0 or 1 by using a  SQL driven new defau value - select  count(*) as DefaultValue from someTable where zip_code = '$(ZipCode)'  [also tried with double and no quotes]. This 0/1 would then be passed to Traffic director module where it would read in the queryString and redirect accordingly.

    However the shorthand token (ZipCode) from the question does not appear to be passed to the Question event. Are question values /tokens passed to the Question event?

     

    Using DNN 5.2.2 Forms 3.3.40

     

    david coulterUser is Offline
    skipping stones
    skipping stones
    Posts:13
    Avatar

    --
    03-22-2010 11:19 AM

    Do you need more details?

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

    --
    03-23-2010 06:14 AM
    HI David, after thinking about this I don't believe it can be done. Textbox fields that a user types in cannot be bind to an an SQL query to obtain the value/values of another field. In your case, can you break the form into two pages, and send what the user entered into the textbox field as a querystring variable (make the shortname DSParam1) and then on the 2nd page, you can bind using the DSParam1 variable. -- David
    david coulterUser is Offline
    skipping stones
    skipping stones
    Posts:13
    Avatar

    --
    03-23-2010 09:37 AM

    No.  The idea would be to redirect the user to one of two pages depending on the result of the Zip Code. The zip codes we  allow are stored in a dB and need to be compared. For example if   user entered zip code 2222 and it was in the dB then they would go to form page 2, ELSE the go to 'Sorry Page'.

     

    Currently we can use the question sql validation feature such that form continues with IsValid and throws an error msg if not Vlaid. My questionis can we pass isValid=0 to a form completion event and redirect fomr there?

    Question validation used and working [ select count(*) as IsValid from TABLE where zipcode = '$(zipcode)'  ]

    Is there another module you know of that can preform this redirect step if  Dynamic forms / registration can not?

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

    --
    04-06-2010 01:34 PM
    HI, it's not possible to pass IsValid to a form completion event because it essentially is not a shortname token. I don't know of a forms module that can do this. Although I'm sure if your form is limited in scope (only a handful of fields and doesn't require any completion events,etc). you could check out Open Web Studio which I believe can be setup to handle this type of task. -- 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