Conditional validation based on the focused element

prabhakars95313 24-03-2015


Hi ,

I have a scenario where a section of PDF is mandatory. Once the user types data into a field within this section the entire section needs to be mandatory. So the validation is

* If any one field is populated and the user tries to move the focus on any control outside this section validation error to be thrown

was trying to write this in the exit event for all the controls within this section, however I was able to confirm if the control is going outside this section or not.

Many thanks

PS

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (4)

Answers (4)

BR001
MVP
26-03-2015

Hi,

The subform for you section has an exit event as well, could you use that?  I haven't tried as I would think it was bad usability to dictate the order a user fills the form in, but I guess there's always an exception to the rule.

Magus069
MVP
24-03-2015

Hi there,

I don't think there is an easy way to prevent the user from changing section as you would probably need a validation script on the enter event of every other fields in the form to validate if any other section if fully filled..

An easy way out of this would be hiding any other sections until this section is fully filled.

Hope this help!