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.
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.
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.
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>