[Plugin: comments] Comment form fields in table
-
Hi there! I am quite new to wordpress so my question may sound stupid. In my opinion I want a very basic thing.
For some reasons I want to customize my comments form labels and fields to appear in table cells.
I am trying to play with a function
comment_form($args);
but with no success.When I try this:
$fields = array( 'author' => '<tr><th><label for="author">jméno:</label> </th>' . '<td><input id="author" name="author" type="text" value="' . esc_attr($commenter['comment_author']) . '" size="30"' . $aria_req . ' />' . ( $req ? '<span class="required">*</span>' : '' ) . '</td></tr>', ); $args = array( 'fields' => apply_filters('comment_form_default_fields', $fields), ); ?> <table> <?php comment_form($args); ?> </table>
This will push the “author” label and input at the bottom of the form. So I have all fields, submit button and then “author” field in the table. Thats not what I want. I have tried to remove “<tr><td>” from the code above and it works as expected.
Of course I have tried to modify all fields so the whole form should appear in the table. Thats not working because according to documentation there is no way how to alter submit button this way. If I do this I have subbmit button and then rest of the form in table as expected.
My question is: How do I change the comment form to apper in the table instead of <p>.
- The topic ‘[Plugin: comments] Comment form fields in table’ is closed to new replies.