Manually validate - InfoPath Dev
in

InfoPath Dev

Manually validate

Last post 09-14-2008 09:24 PM by Jonesie. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-14-2008 09:24 PM

    • Jonesie
    • Not Ranked
      Male
    • Joined on 02-10-2008
    • Christchurch, New Zealand
    • Posts 10

    Manually validate

    Hi

    We have a large form in 5 views that is running in Forms Server - web only.  The validation messages and required field message displayed by Forms Server are fugly so we used a bunch of rules, a reference "error" attribute and a bit of xpath on a custom submit button to make things look better.  The problem is the customer is not happy to do all this work for the remaining 20 or so forms they need.  Instead they want to transfer all that complexity to C# ... go figure!

    Anyways, I think the way to do this is to create a submit handler that will do the validation and cancel or not.  This is easy enough, but it means moving all the validation logic to code.

    So, finally, my questions:

    1) is it possible to execute the validation settings in controls from code?  Eg, by looping through all the controls in the collection?

    2) is it possible to disable the default validation?  I created a real simple form with required fields and the default validation fires before submitting, regardless of what I do in the submit handler.

     

    Thanks muchly.

     

     

    Peter G Jones - http://jonesie.net.nz
    Microsoft MVP - ASP.Net
    New Zealand
Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.