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

Question

Question

Unable to make multi-line fields required using java script

asked on November 2, 2015

I am trying to make a multi-line field dynamically required using Java Script code similar to $('.this input').attr('required', 'True'); but for some reason it won't work on this filed type. I've used this code many times on other field types with no problems.

 

Does anyone have any suggestions please?

 

Thanks!

0 0

Answer

APPROVED ANSWER
replied on November 2, 2015

Hi Ken,

A multi-line field is a textarea rather than an input. You can use

$('.this textarea').attr('required', true);

3 0

Replies

replied on November 2, 2015

Alexander,

Thank you! Thank you! Thank You!

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

Sign in to reply to this post.