AnsweredAssumed Answered

How can I make a textbox readonly based on the customer's Area selected from a dropdown menu?

Question asked by USARC_G6_SDM on Jan 12, 2018
Latest reply on Feb 6, 2018 by USARC_G6_SDM

How can I modify customers' incident/request forms with an IF/ELSE statement that will either display a Readonly textbox, or an editable one based on the attribute "category" that the customer chooses from a dropdown menu?  I have tried using the script below with the following results: Any area name , such as Classified, entered in the  

          <PDM_IF "$args.category" == "Classified">

line will generate an editable textbox. If I replace the word Classified with "", then a readonly box appears. 

How can I make the box Readonly when the Area called "Classified" is selected?


<PDM_MACRO name=dtlHier hdr="Incident Area" attr="category" make_required="YES" autofill=yes common_name="ss_sym" evt="onChange=\\\"change_category_func('cr')\\\"" factory=pcat_cr_ss size=30>


<PDM_IF "$args.category" == "Classified">
<PDM_MACRO name=dtlReadonly hdr="Incident Description" attr="description">
<PDM_MACRO name=dtlTextbox hdr="Incident Description (Do Not Enter Classified details or Attachments) " attr="description"  keeplinks=yes make_required=yes rows=8 size=80 spellchk=yes>