Sample Script
async function onChange(forpage,oldVal,newVal,executeOnLoad){
if(executeOnLoad){
return;
}
var val = current.Job.getValue(current.Layout.Fields.<select-User-occupation-parameter-here>.id);
if ("Student" === val.value.display_name)
{
current.Layout.Fields.<select-Name-of-your-school-or-college-parameter-here>.show();
current.Layout.Fields.<select-Would-you-like-to-avail-a-discount-parameter-here>.show();
current.Layout.Fields.<select-Name-of-your-company-parameter-here>.hide();
current.Layout.Fields.<select-Your-designation-in-the-company-parameter-here>.hide();
current.Layout.Fields.<select-Name-of-your-organization-parameter-here>.hide();
current.Layout.Fields.<select-Would-you-like-to-purchase-Qntrl-for-your-org-parameter-here>.hide();
}
else if ("Working Professional" === val.value.display_name)
{
current.Layout.Fields.<select-Name-of-your-school-or-college-parameter-here>.hide();
current.Layout.Fields.<select-Would-you-like-to-avail-a-discount-parameter-here>.hide();
current.Layout.Fields.<select-Name-of-your-company-parameter-here>.show();
current.Layout.Fields.<select-Your-designation-in-the-company-parameter-here>.show();
current.Layout.Fields.<select-Name-of-your-organization-parameter-here>.hide();
current.Layout.Fields.<select-Would-you-like-to-purchase-Qntrl-for-your-org-parameter-here>.hide();
}
else if ("I run my own business" === val.value.display_name)
{
current.Layout.Fields.<select-Name-of-your-school-or-college-parameter-here>.hide();
current.Layout.Fields.<select-Would-you-like-to-avail-a-discount-parameter-here>.hide();
current.Layout.Fields.<select-Name-of-your-company-parameter-here>.hide();
current.Layout.Fields.<select-Your-designation-in-the-company-parameter-here>.hide();
current.Layout.Fields.<select-Name-of-your-organization-parameter-here>.show();
current.Layout.Fields.<select-Would-you-like-to-purchase-Qntrl-for-your-org-parameter-here>.show();
}
}