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

Question

Question

User task form - Check box disabled but value not captured after form submission

asked on September 9, 2020

I had my previous question on how to disable the checkbox in the user task form stage.

I got it to work by the below jscript.

$('#Field42-0').attr('disabled', true);
      $('#Field42-1').attr('disabled', true);
      $('#Field42-2').attr('disabled', true);

So when the form is initially submitted the initial user selects the check box choices and this gets assigned to a user task for approval and the checkboxes are disabled which is good. (so no modification is made to the initial selection)

But after the form is acknowledged when the form is getting filed in the repository the checkboxes do not show any selections so the values are not captured after the acknowledgement button is clicked.

How can i reenable the checkbox (that were checked ) after the user clicks the approve/acknowledge?

Below is the javascript i have so far.

$(function()    
 {   
 
var StepID = $('input[name="stepid"]').val();
    if (StepID != 1)
    {                 

      $('#Field42-0').attr('disabled', true);
      $('#Field42-1').attr('disabled', true);
      $('#Field42-2').attr('disabled', true);
      
    }
   
});

0 0

Answer

SELECTED ANSWER
replied on September 10, 2020

I got it to work with the below removeAttr on the checkbox. Here is the code snippet for reference.

 

$(document).ready(function() {
       $('.Submit').click(function(){
         $('#Field42 input').removeAttr('disabled');
    
    })
         });

1 0

Replies

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

Sign in to reply to this post.