Validate form fields from InfoPath custom code

Posted by Alex Angas on Stack Overflow See other posts from Stack Overflow or by Alex Angas
Published on 2010-02-22T04:20:22Z Indexed on 2010/05/11 4:24 UTC
Read the original article Hit count: 342

I'm developing an InfoPath form for Forms Services. It has these views:

  • View 1 asks the user to input some basic initial data
  • View 2 calls a web service based on data in View 1 and populates drop-downs accordingly

At the bottom of View 1 I've added a Next > button to move to View 2. As part of clicking that button I would like the inputs in View 1 to be validated first. However, there don't appear to be any rules that validate a view or anything in the object model to execute validation rules.

Is there code that can trigger a field's validation event?

© Stack Overflow or respective owner

Related posts about infopath

Related posts about infopath-forms-services