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

Question

Question

Feature Request: Option to Make Comment Required

asked on March 3, 2014

We have specific steps in our BP that we would like to make a Comment required before the User is able to select an option.

9 0

Answer

SELECTED ANSWER
replied on March 3, 2014

Thanks for the feature request! I'll pass this along to the team. In the meantime, because you can target the user task comments and action buttons with the JavaScript you include with your form, you should be able to accomplish what you're trying to do with a small amount of code.

4 0

Replies

replied on July 6, 2016

Here is the Javascript I have used to make the Reject button require comments:

 

$(document).ready(function () {

    $('.Reject').click(function(){
   if($('#comments').val() == '')
   {
      alert('Please enter information into the Comments box before selecting this action');
      return false;
  }
    });
  
});

3 0
replied on March 3, 2014 Show version history

++

 

This is similar to something I've asked for before. It would be nice to have templates support conditional rules: Fields that require other fields to be filled, if a value is more than a certain amount then require a certain field, or show/hide or enable/disable certain fields depending on various conditions.

2 0
replied on March 3, 2014 Show version history

Depending on the type of field you are dealing with you can programmatically disable an option (making it appear "grayed out") until you fill in a different field. You can also hide that field until you fill in a different field. 

 

I will post a javascript example in a moment. 

 

 

Edit: I see you don't need that. I thought you were talking about on the form.  sorry!

 

 

0 0
replied on March 3, 2014

It has to do with the comment box when the form is at a User Task. It is not a field that is added to the form, it is built into Forms.

1 0
replied on March 3, 2014

You can target the comment box with JavaScript when you're building a form, so you should be able to accomplish this using the same methods described in other answers on this site.
 

The HTML markup for the comment box and its buttons:

 

 

Target the comment box using the #comments selector, and the buttons collectively with .action-btn.

0 0
replied on March 5, 2015

I just want to make sure the above HTML markup is used to make the comment field required as the original questions requested for and how, please be more specific considering the fact that i am not good in Jquery and also specify where can i add this in the forms to achieve it.

1 0
replied on May 16, 2016

I had already tried this but didn't work for me can you please let me know in detail how to apply the above HTML markup for my form, actually my requirement is when the form is rejected the comment should be made required.

 

Please let me know if this is possible ??

0 0
replied on July 5, 2016

Is someone please able to post the Javascript used to make Comments a required field before Approval/Rejection?

 

Thanks

0 0
replied on March 7, 2017

Thanks, Grant. I used the JavaScript above to make the Comments box required. Thank you. The only issue I'm having is that sometimes the comments box is disabled and I cannot type anything in it. For a temporary fix, I placed some custom HTML text to the user to use F5 to refresh:

 

Has anyone else had an issue with the following JavaScript?

$(document).ready(function(){

//Make comments required when rejecting
$('.Reject').click(function(){
    if($('#comments').val() == '')
    {
       alert('Please enter information into the Comments box before selecting this action');
       return false;
    }
  });

});  //close document.ready

 

0 0
replied on May 8, 2018

I am finding that if I am using a form with no tabs, I get redirected to a page with only the comments box showing red. I can't return to the rest of the form. Any tips on how to prevent?

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.