How to send value to Html field using server/client script?

Bharath kumar6
Tera Expert

I need to send the value of incident task's description in the below field.

This field is in the portal.

<div class="edit_email" ng-if="edit">
<h2> Email Response: </h2>
<textarea style="width: 100%; margin-bottom: 20px;" ng-model="data.approval.task.description" ng-model-options={}>
</textarea>
</div>

 

This text area will come up when a user clicks on "Edit" option.

And this text are should contain the description of the current incident_task.

How do I pass the description value to this field.

2 REPLIES 2

Anmol8
Mega Guru

Hi,

You can do it like this
HTML:

<textarea id="comments" name="comments" rows="4" cols="30" ng-model="c.data.comments">
</textarea>

Server Side:

if (input && input.op && userApprovalAccess) {
gr.comments = input.comments;
}

In var field line,

use this 

var fields = $sp.getFields(gr, 'state,sys_created_on,comments');

 

use this below data.fields = fields;

var work = gr.comments.getJournalEntry(1);
var array = work.split(")");
data.comment = array[1];

Now,In comments we have got comment we entered


In HTML to display server side data use

Comment:<div>{{c.data.comment}}</div>

It will pass data from HTML to server side

Please mark correct and helpful if it helps you.


In case of any further, message me.

 

Regards

Anmol Saraswat

Anmol8
Mega Guru

You can refer to these links for further information:

Please mark this response as 'Helpful' if this answers your question or reply to me if you have any other queries.

Thank you.