Hey All - brand new to java scripting in portal pages.
I'm trying to say if DOB Unknown is set to No, which is the default setting for this field, make Victims Date of Birth Required. If DOB unknown is set to Yes, don't make Victims Date of Birth required. I'm using this snippet of code I found online
//New code DOB required
function makeDobRequired() {
debugger;
var KnowDob = $("#hd_victim_dob_unknown").val();
if (KnowDob == 0) //if dob is known
{
makeRequired('cra83_dateofbirth');
}
else if (KnowDob == 1) ////if dob is not known
{
makeNotRequired('cra83_dateofbirth');
}
}
it's not working tho. Can anyone share the correct code to execute this?
thx