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

Question

Question

Select a checkbox based on a radio button

asked on April 6, 2022

How with JavaScript can I  get this accomplished. So on the status field when "New Request"  radio button is selected I would like to have the "Yes Training" checkbox selected.

thanks in advance

training.jpg
training.jpg (6.58 KB)
0 0

Replies

replied on April 7, 2022 Show version history

Try this

 

 

$(document).ready( function() {
  $("#q48 input").change(function() {
    if ($("#Field48-0").prop("checked") == true)
     $("#Field24-0").prop("checked", true)
    else
      $("#Field24-0").prop("checked", false);
  });
});

0 0
replied on April 7, 2022

Nice, what does the "-0" #Field48-0 or #Field24-0 in mean?

0 0
replied on April 7, 2022

Ok, I got it. It's the value of  the box or radio button. thanks it works nicely

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

Sign in to reply to this post.