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

Question

Question

Dynamically require table fields after they click Add

asked on December 4, 2014

I have some JavaScript that makes some Table fields required after a Radio Button is set to YES.

When a user clicks Add the repeated rows do not become required.

 

What's the syntax for a function that would enable making any Added rows required?

0 0

Answer

SELECTED ANSWER
replied on December 4, 2014

You can append following code to your original script:

 $('.cf-table-add-row').click(function () {
  if($('.radiocss input[value="Yes"]:checked').length>0){
   $('.target input').attr('required', 'True'); 
    }
});

 

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.