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

Question

Question

Javascript not showing on user task

asked on March 26, 2018

HI All.

 

I have a form that needs the text field background to change color when their input is altered.

It works on the submission form but the color does not display on the next user task review step.

This is my form :

 This is my code:

 

$(document).ready(function() {
  
setTimeout(function(){
$('body').addClass('loaded');  
}, 3000);

highlight();
$('.cf-table-block').on('blur', 'input', highlight);

function highlight(){
    $('.cf-table-block tbody tr').each(function(){
    if ($('[name=IsLocked]').val() == 'True'){
	var t1 = $(this).find('.tableclass .ro').text();}
      
    $("input[type=text]").change(function() {
    $(this).css("background","red"); });  
    });
}
});

Any help will be highly appreciated.

Thanks.

0 0

Replies

replied on March 26, 2018 Show version history

This is likely because your code requires user interaction for changing colors (and at the user review stage, there are no 'blur' actions). Basically, Forms will run through your entire code when the review form loads so you need to make sure that the highlight function takes effect at that time. 

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

Sign in to reply to this post.