Answers for "jquery remove make required false"

2

jquery remove required attribute

//jQuery option 1
$('#fieldToRemove').prop('required',false);

//jQuery option 2
$('#fieldToRemove').removeAttr('required');

//with querySelector
document.querySelector('#fieldToRemove').required = false;
Posted by: Guest on March-12-2021
0

required false jquery

if(val == 'other')
{
  $('#amount1').show().prop('required','true');
}
else
{
  $('#amount1').hide().removeAttr('required');   
}
Posted by: Guest on January-08-2021

Code answers related to "jquery remove make required false"

Code answers related to "Javascript"

Browse Popular Code Answers by Language