Changing Field Required/Optional setting with Javascript

cancel
Showing results for 
Search instead for 
Did you mean: 
Member II

Changing Field Required/Optional setting with Javascript

Jump to solution

Is there a way to change the required setting for a field on a task on the fly using Javascript?   I want to change the setting for field2 based on what was entered info field1.   

1 Solution

Accepted Solutions
Senior Member II

Re: Changing Field Required/Optional setting with Javascript

Jump to solution

Hi Gary,

It is possible to do that with javascript. If you have a field which is going to be conditionally mandatory, make sure that you keep it optional in your form model. Then at runtime modify it using java script. Please find attached a sample form model. You can import it via App Designer (Kick Start) -> Forms -> Import

Also, please note that if you are using  for your end user application, these javascript logic needs to be applied in your ADF application

Cheers,

Ciju

View solution in original post

2 Replies
Senior Member II

Re: Changing Field Required/Optional setting with Javascript

Jump to solution

Hi Gary,

It is possible to do that with javascript. If you have a field which is going to be conditionally mandatory, make sure that you keep it optional in your form model. Then at runtime modify it using java script. Please find attached a sample form model. You can import it via App Designer (Kick Start) -> Forms -> Import

Also, please note that if you are using  for your end user application, these javascript logic needs to be applied in your ADF application

Cheers,

Ciju

View solution in original post

Member II

Re: Changing Field Required/Optional setting with Javascript

Jump to solution

It worked great!  Thank you