cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a field mandatory depending on another

Antoine_Cordier
Star Contributor
Star Contributor

Hello,

On the create view of one of my documents I have a list box with 3 values: a, b, c, and a date picker.

I need the date to be set as mandatory only if a or b is present in the list box.

I've been reading here and there about JSF and found that the most approaching answer was given by this topic on stackoverflow:

http://stackoverflow.com/questions/5182106/make-a-hinputtext-required-only-when-the-checkbox-is-sele...

But when I try to reproduce this kind of declaration inside my layout definition, it just doesn't work.

Can anyone please share a sample ?

1 ACCEPTED ANSWER
5 REPLIES 5

Thanks you! For any reason I had to use getSubmittedValue() instead of getLocalValue() to get it done.

That's the right one to use when dealing with an input component

Thanks for this usefull precision

Hey Antoine Cordier,did you achieve this in client side without pressing the submit button?

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.