Can anyone help me understand how I make one text field read only if another field on the same form has been populated.
e.g. Field A when populated with a value makes field B read only.
here is some examples based on algorithm:
Re: Customizing dtlDate macro
New field required if 'yes' is selected - Customizations / Modifications - ServiceDeskUsers
With the links help managed to get it to work....
<PDM_IF "$args.z_final_ci" == "">
<PDM_MACRO name=dtlLookup hdr="Configuration Item" attr=affected_resource evt="onChange=\\\"assetChanged()\\\" onFocus=\\\"assetChanged()\\\"" make_required=yes>
<PDM_MACRO name=dtlReadonly hdr="Configuration Item" attr=affected_resource>
I am having a similar situation but here I want to make drop down and date field read only/editable on selection of particular status.
I tried the solution from the links mentioned above by you which is working perfectly for text field but it is not working for date and drop down field.
Is there any thing different that we need to do for drop down/date field?
to make date field readonly you also need to disable click event/URL in field's header and write a method to make it clickable again. This can be done using JS/JQuery but I haven't any useful examples.
For these purposes in our env we are simply switching mandatory state:
detailMakeReq("sched_start_date", false); // to make "sched_start_date" RequireddetailMakeReq("sched_start_date", true); // to make "sched_start_date" not Required
And users in most situations aren't fill unrequired empty fields for no reason