How to hide sections on form depending on process flow step

IronPotato
Mega Sage

Hi All,

 

is there any possible way how display certain section with fields depending on process flow step we are actually in?

I was trying Client Script onLoad but the thing is that fields on other section are mandatory as well. 

Each step will have their mandatory fields.

 

 

IronPotato_1-1698782727618.png

 

Any help would be appreciated.

 

Thank you

1 ACCEPTED SOLUTION

Alka_Chaudhary
Mega Sage
Mega Sage

Hello @IronPotato ,

You can make the field mandatory false 1st then make it visible false.

Suppose, I have field 'Service' which is mandatory and I have to hide it then I will write below script:-

g_form.setMandatory('service',false);
g_form.setVisible('service',false);

Another scenario:- 

when you have to make it visible then make it visible true 1st then mandatory true. 

Suppose, I have field 'Service' and I have to make it visible and mandatory then I will use the below script:-

g_form.setVisible('service',true);
g_form.setMandatory('service',true);

 

Please Mark my answer Helpful & Accepted if I have answered your question.

Thanks,

Alka

View solution in original post

2 REPLIES 2

Alka_Chaudhary
Mega Sage
Mega Sage

Hello @IronPotato ,

You can make the field mandatory false 1st then make it visible false.

Suppose, I have field 'Service' which is mandatory and I have to hide it then I will write below script:-

g_form.setMandatory('service',false);
g_form.setVisible('service',false);

Another scenario:- 

when you have to make it visible then make it visible true 1st then mandatory true. 

Suppose, I have field 'Service' and I have to make it visible and mandatory then I will use the below script:-

g_form.setVisible('service',true);
g_form.setMandatory('service',true);

 

Please Mark my answer Helpful & Accepted if I have answered your question.

Thanks,

Alka

@Alka_Chaudhary ,

 

thank you very much