comment form name and email not working?

I am trying to post comment using the comment form but it says:

Error: Please fill the required fields (name, email).

what should I do, please?
here is my code:

'author' =>
                '<div class="row padding-xs-top">
                <div class="col-md-4 col-sm-4">
                    <div class="form-group ct-form-group-label--float"><label for="contact_name">' . '</label> <span class="required"></span><input id="contact_name" name="field[]" class="form-control input-lg" type="text" value="Name *"' . esc_attr( $commenter['comment_author'] ) . '" required="required" /></div></div>',
                
            'email' =>
                '<div class="col-md-4 col-sm-4">
                <div class="form-group ct-form-group-label--float"><label for="contact_email">' . '</label> <span class="required"></span><input id="contact_email" name="field[]" class="form-control input-lg" type="email" value="Email *"' . esc_attr(  $commenter['comment_author_email'] ) . '" required="required" /></div></div>'

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Incorrect field names

'author' =>
                '<div class="row padding-xs-top">
                <div class="col-md-4 col-sm-4">
                    <div class="form-group ct-form-group-label--float"><label for="contact_name">' . '</label> <span class="required"></span><input id="contact_name" name="author" class="form-control input-lg" type="text" value="Name *"' . esc_attr( $commenter['comment_author'] ) . '" required="required" /></div></div>',
                
            'email' =>
                '<div class="col-md-4 col-sm-4">
                <div class="form-group ct-form-group-label--float"><label for="contact_email">' . '</label> <span class="required"></span><input id="contact_email" name="email" class="form-control input-lg" type="email" value="Email *"' . esc_attr(  $commenter['comment_author_email'] ) . '" required="required" /></div></div>'


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x