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

Question

Question

Javascript doesn't allow form to be submitted

asked on August 15, 2016

Can't see what is wrong with my code here. I just want to hide a field and make sure the form can still be submitted by setting required to false. When I click submit the button does not work and the browser page just does a micro-jump stutter as if though the field is still required but hidden. I have to go manually make the field not read-only in the editor in order to submit.

$('.show1').hide();
  $('.show1 input').attr('required', 'False'); 

 

0 0

Answer

SELECTED ANSWER
replied on August 16, 2016

Chad,

 

Try this one:

 $('.show1 input').hide('fast');
            $('.show1 input').prop('required', false);

The .prop method seems to be more efficient than the .attr method in many cases.

1 0
replied on August 17, 2016

Awesome thanks!

0 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.