- You are not able to submit the form because you replaced your
<input type="submit" />
with an anchor tag. You have to add the capability to submit a form to your<a>
tag .button a
was not working because you did not have any<a>
tag inside your<input type="submit">
tag which is what was expected when you used.button a
Few changes from the html and js and things will start working for you.
Your new HTML stays intact.
<p class="button"><a href="#null"></a></p>
Your JS / Jquery if you can use it becomes this:
$('.button a').on('click', function(){
$(this).closest('form').submit();
});