Expand my Community achievements bar.

Conditional validation based on the focused element

Avatar

Level 1


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

4 Replies

Avatar

Level 10

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!

Avatar

Level 10

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.

Avatar

Level 1

Thanks for your reply. As an approach this is a good alternative, however may not be able to implement this due to the requirements.

Regards

PS

Avatar

Level 1

Hi,

Will try this out and see if this works.

Regards

PS