CA Service Management

  • 1.  How to make a form field required depending upon other field?

    Posted Mar 14, 2017 11:24 AM

    Hi Team,

     

    I have two field in service catalog form namely roles & comment.Now if value of roles is 1 then I need to make comment field required.How to do it any idea or suggestion?

    Thanks in advanced.

     

    Best Regards,

    Pankaj



  • 2.  Re: How to make a form field required depending upon other field?

    Posted Mar 14, 2017 06:02 PM

    Unfortunately we currently do not have a way to programmatically interact with the 'Required' form field attribute. One option could be to create a second required comment field that is hidden by default and invoke a JavaScript function onChange of the roles field to show/hide the necessary comment field. Note that as Catalog does not store the state of form fields governed via JavaScript you will need to create a function invoked onLoad of the form to also check and show/hide the appropriate field.