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

Question

Question

Column values from a selected row in a table

asked on March 29, 2022

I am able to use the following JS code to find if a checkbox is selected in a table row.

//selected checkbox  
  $(".select_checkbox input").on("change", function() {
  if (this.checked) {
    //alert("i am checked!"); 

   var selectedname = $(this).find('.name_row input').val();

alert(selectedname); 
}

});

But I am not able to extract the values of other field values in that row.

In the above code, I wanted to find the name value in that selected row.

I tried to use formula in a hidden field which is also not working.

 

0 0

Replies

replied on March 29, 2022

I was able to get this done by using the following code

var selectedname = $(this).closest('tr').find('.name_row input').val();

1 0
replied on April 1, 2022

I think you just saved my life.  Almost every Form I develop needs this functionality, and I've spent two days on this Support site.  

Thank you for taking the time to post this.

0 0
replied on April 1, 2022

Glad to hear that! smiley

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

Sign in to reply to this post.