Answer the question
In order to leave comments, you need to log in
How to add placeholder to woocomerce feedback fields?
in the comment template - single-product-reviews.php
there is an output of the fields, but how to add a placeholder to them?
foreach ( $fields as $key => $field ) {
$field_html = '<p class="comment-form-' . esc_attr( $key ) . '">';
$field_html .= '<input class="form_input" id="' . esc_attr( $key ) . '" name="' . esc_attr( $key ) . '" type="' . esc_attr( $field['type'] ) . '" value="' . esc_attr( $field['value'] ) . '" size="30" ' . ( $field['required'] ? 'required' : '' ) . ' /></p>';
$comment_form['fields'][ $key ] = $field_html;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question