I’ve been handed over a design to translate into WordPress plugin & theme. My question is regarding building a custom comment form.
The design used some custom scripts on the comment submit button. It handles ‘submitting…’ button state, animations, and checks. And it uses an anchor tag <a>
with jQuery’s .bind
to submit the form.
I noticed that the comment_form
function of WordPress did not offer a solution to change the submit button. I only needed to remove it as I’m handling it myself.
What made it worse is that WordPress has hard coded <input name="submit">
into the button, which made it impossible for jQuery to call .submit
(more details on this issue here: https://stackoverflow.com/questions/12540953/property-submit-of-object-htmlformelement-is-not-a-function). So just hiding this button with CSS won’t work.
If I prefer not to use the <input type="submit">
button of WordPress comment form, do I have any options to build my own button?
Thanks.
This is hard. Output buffering could solve that:
Just an idea, not tested.