cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Field Required/Optional setting with Javascript

wb9tpg
Champ in-the-making
Champ in-the-making

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 ACCEPTED ANSWER

cjose
Elite Collaborator
Elite Collaborator

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 answer in original post

2 REPLIES 2

cjose
Elite Collaborator
Elite Collaborator

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

wb9tpg
Champ in-the-making
Champ in-the-making

It worked great!  Thank you