Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them, it only takes a minute:

Is there a way in InfoPath 2010 to require certain fields based on the action performed? I have a request approval view which essentially just contains all of the content of the original request form in read-only format, and the reviewer can approve the request, reject the request with feedback, or request ad-hoc review. If the reviewer chooses the 'reject' action, they should be required to provide feedback (but only if they choose this option). If the reviewer chooses to request an ad-hoc review, they should be required to choose a person from some sort of person picker.

TL;DR - I need to require certain fields based on the action the user chooses.

share|improve this question

1 Answer 1

Use a custom button to submit the form and run set of rules when the button is clicked, i.e. a validate rule and a submit rule. Set the validate rule to run if Field1 is "foo" and Field2 is empty. The action is to set a trigger field that shows/hides a section with an error message. Stop rule execution after the validate rule, so the form won't be submitted.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.