The CreatorCon Call for Content is officially open! Get started here.

make a field visible and mandatory if other field changes values

hadron_collider
Tera Contributor

Hello,

 

 

I am trying to make the field "Reject reason" visible and mandatory to fill in in order to change the status.

 

kata90_0-1704463611188.png

 

 

 

23 REPLIES 23

@Kata ,

 

Something similar to this:

 

ahefaz1_0-1704495264065.png

 

Source Scope and application will be your custom expense application.

Please mark helpful if this helped or accept the solution if it solved your query.

 

Thanks,

on the ui action check this

 

 

if(g_form.getValue('reject_reason')=='')
g_form.setMandatory('reject_reason', true);

 

 

-Anurag

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

You can create a ui policy to do so and in the ui policy action you can add the reject reason with the attributes as below.

Mandatory - true

read only - false

Visible - true

-Anurag

Danish Bhairag2
Tera Sage

Hi @hadron_collider ,

 

Do u already have the Reject Reason field available/created on that form/Table. If yes just add this script in your Reject UI action. Make sure client checkbox is checked.

 

g_form.setDisplay('reject_reason',true);//use proper backend name of the variable
g_form.setMandatory('reject_reason',true);//use proper backend name of the variable

 

If no then please create 1 new field & then follow the above step.

 

Thanks,

Danish