0

How can I clear value in this text-box with SharePoint List using JS?

I am using Approval process where Approver 1 put remarks in this text-box and then saves item.

So, when Approver 2 opens the same item, remark column must be empty.

enter image description here

1
  • Is remark Multiline text filed ? if so, then mark "Append Changes to Existing Text " to Yes for Remark field. Commented Dec 19, 2019 at 6:05

2 Answers 2

1

If you are using SharePoint OOTB form and your Remark field is multiple lines of text:

You can save the existing remarks from all the Approvers and will be able to get the empty text-box when next approver tries to add his/her remarks using cool feature in SharePoint called Append Changes to Existing Text.

For using this first you need to enable the versioning on your list/library. check below article for step by step guide on using Append Changes to Existing Text:

How to track comments with “append changes” functionality in SharePoint List.

2
  • Hello, have you tried this? do you have any question regarding this? Commented Dec 23, 2019 at 10:35
  • Hi Ganesh Sanap,I already using append changes to existing text. But I want previous remark is deleted. How make like that?
    – Kfajar
    Commented Dec 23, 2019 at 10:48
0

Here is a JS code demo for your reference:

<script src="http://code.jquery.com/jquery-1.12.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
    var fieldName="MultipleText";
    var defaultText = " ";
    $('nobr:contains(' + fieldName + ')').closest('tr').find('input[id$="TextField_spSave"]').val(defaultText);
});
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.