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!

Validate specific numeric field values
Last Post 12-21-2012 05:21 AM by Ryan Bakerink. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Matthew CrowshawUser is Offline
wading in the water
wading in the water
Posts:20
Avatar

--
12-07-2012 10:54 AM

    I am creating a form that has a field which will only be allowed to accept one of two values (for security purposes, it can't be a drop down or radio button, the user has to know what it is from a different source).

    For example I would like to only allow either 4521 or 4522 in this field, and if it's not one of those two, present a message to the user.

    Any suggestions on how best to validate the field entry? (I'm a newbie...)

    TIA,

    Matt

    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    12-07-2012 11:47 AM
    Hello Matt,

    This sounds like a great opportunity to utilize JavaScript.

    You should notice when managing a Dynamic Question in Dynamic Forms that under Advanced Question Options you should see a section titled "Client Side". This section acts similar to the OnChange attribute of HTML Input fields.

    So you should be able to add the validation into this area using JavaScript. If the short field name of your question is "TestField" then you should be able to use JavaScript like the script below:

    if($(TestField) != '4521' && $(TestField) != '4522')
    {
    alert('Invalid');
    }
    else
    {
    alert('Valid');
    }


    Please try this script and let me know how it goes for you.

    Let me know if you have any questions.

    Thanks,

    Ryan
    Matthew CrowshawUser is Offline
    wading in the water
    wading in the water
    Posts:20
    Avatar

    --
    12-13-2012 12:03 PM
    Thank you, the javascript works as expected.

    However, I have a very picky customer and they want all error/invalid input messages to be consistent.

    I have tried the 'enable compare validator' successfully (sort of). By default it shows the field. I then hid the field by role, however there is a bit of a lag on the screen and you can see the field disappearing.

    Long explanation for a short question: Is there any way for compare validator to work against a hidden field? The 'compare to' field disappears from the dropdown of available fields when I change it to hidden.

    TIA,
    Matt
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    12-21-2012 05:21 AM
    Hello Matt,

    I've never tried to use a Compare Validator against a hidden field. It sounds like there might be some conflicts on the page(jQuery).

    You can always use JavaScript to achieve the same thing as the built in Compare Validator. I'm not sure how your site is configured and what all of your environment variables are,but can you confirm if the feature works correctly on non-hidden fields?

    Thanks,

    Ryan
    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