Conditional Validation

LabKey Support Forum
Conditional Validation marcia hon  2018-02-12 07:40
Status: Closed
 
Hello,

We have a situation where:

1. If DOBUnknown is checked off, then DOB should be empty
2. And vs versa, if DOB has a values, DOBUnknown should be empty

How could we enforce these conditions?

Thanks,
Marcia
 
 
Jon (LabKey DevOps) responded:  2018-02-16 18:28
Hi Marcia,

Assuming that you mean the input form when someone enters in data, by default, we do not provide this level of conditional validation.

It is possible for you to leverage our Javascript API and build your own input form in a wiki page or within a custom module that can do this kind of conditional validation before the data is inserted, provided you also can write your own Javascript code as well to do the conditional validation.

Please take a look at our basic tutorial doc on creating an application via the JavascriptAPI: https://www.labkey.org/Documentation/wiki-page.view?name=javascriptTutorial

Regards,

Jon