Hi All,
I'm using Apex 5.1. Depending upon the value of another item; i want to change the required property of a text item. By default, P2_ITEM_2 should be a required field except when the value of P2_ITEM_1 is A. So far I've tried the following -
** For P2_ITEM_2, Set the Value Required property = Yes. and wrote the following as Dynamic Action- chnage event-js :
if($v("P2_ITEM_1") == 'A'){
$("#P2_ITEM_2").prop('required',false);
}else{ // though else part is not required I guess
$("#P2_ITEM_2").prop('required',true);
}
Also tried with - $("#P2_ITEM_2").prop('aria-required',false); -- Didn't work as I've checked with $('[required]').
** Other possibilities:
(1) Field template : Required. (Can't do it because of some restrictions.)
(2) Be default set Value Required property of P2_ITEM_2 to No. then do NOT NULL validations. (Can't do it either).
So, tried with JQuery; but could't make it work. Any help will be highly appreciated.
Thanx.