Set a Form TextArea Component with mulltiple-line text in CA Service Catalog.

Document ID : KB000015198
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

How to get a CA Service Catalog(SC) Form, TextArea-Component setup with mulltiple-line text?

To get a TextArea form-field populated with default text when the form opens.

 

Environment:
Windows running CA Service Catalog 14.1(and 17.0)
Answer:

Perform the below steps to accomplish this:

 

1. In SC/Catalog/Forms/Forms, Create a form with a component of type 'Text Area'. 

The _id of the form = form2 

The _id of the field = txta 

 

2 Add the following script to the form: 

nl : function() { 

ca_fdSetTextFieldValue('form2', 'txta', 'l1' + '\n' + 'l2'); 

 

3 Next, in the 'onLoad' of the form, enter the function-call: ca_fd.js.nl() 

4 Save the form(change). 

 

5 Create a new offering/service/service option with this form.

6 Open a new request for that service-option.

> The field will show a 'default' multi-line value (First line shows l1, 2nd line shows l2).

 

Additional Information:

As per design, this can only be done through a form-script-function.