You are viewing limited content. For full access, please sign in.

Question

Question

Capturing approver comments in a variable

asked on February 2, 2024

I have a scenario where I need the approver's comment output onto a Final PDF form. I am able to put the previous user's comments into a variable upon submitting the next form in the process. I am using the previous submission process {/dataset/_comment} {/dataset/_submitter_displayname} {/dataset/_submission_time}. 

However, I can not capture the final approver's comment without using an additional form. This requires an approver submittal. Is there a better way to do this?

1. Can you capture the current comment upon submittal?

2. Can you auto submit the final form to grab the previous approver's comment, thus not requiring user interaction?

Thank You,

0 0

Answer

SELECTED ANSWER
replied on February 2, 2024

I never use the Laserfiche comments and create my own multi-line fields for comments.  In Laserfiche 11 use this css to hide the Laserfiche comments box:

#comment-container
{
  display:none;
}

 

5 0
replied on February 2, 2024

Second this. I've had to do this so that I could add approval comments in a Forms scheduled report since the built-in comments are not available as variables. Would love for this functionality to be added instead of having to do this workaround.

1 0
replied on February 2, 2024

Thanks Craig and Kevin. I have used that as a workaround in the past as well. I guess that is the only way for now. 

0 0

Replies

replied on February 3, 2024 Show version history

You can capture the Comment field on submit with the code below and have it put into a field on the form. In the example below, I used a Multi-line field (Class UserComments). This code changes the value, not append to it, but that could be possible with some code adjustments.

$(document).ready(function(){
//Copy Comment field into Multi-line field on Form
  $('.Submit').click(function(){
  var lastComment = $('#comments').val();
  $('.UserComments textarea').val(lastComment).trigger('change');
  });
});

3 0
replied on February 7, 2024

Thank You for the tip Steve. I am going to test this out. 

0 0
replied on May 20

This work for me. For the other user:

$(document).ready(function(){
//Copy Comment field into Multi-line field on Form
  $('.Submit').click(function(){ //Replace 'Submit' with the name of your button
  var lastComment = $('#comments').val();
  $('.UserComments textarea').val(lastComment).trigger('change'); //Replace 'UserComment' with the name of your multiline variable
  });
});

You are not allowed to follow up in this post.

Sign in to reply to this post.