Those classes are being rendered inline because the id_form
, class_form
, and class_submit
parameters should be placed within the $comments_args
array (alongside title_reply
, comment_field
, etc) and not within the $fields
array. See comment_form().
Also one last question, is there any way to re-arrange the order of
the fields?
Yes, the fields can be reordered. Here’s an answer that shows how to accomplish reordering and customizing the comment fields. The main gotcha with reordering the comment fields is that if you want the main comment field to appear above the name/email/URL/etc fields, the comment_form_defaults
filter needs to be used to set $comment_field
to an empty string. This is because of how the parameters are set up; $comment_field
is special and not part of the $fields
array by default. This is covered in the answer linked above.