Juten abend da draussen,
ich wollte die Felder des Kommentarformulars ändern, so dass die value bei Klick gelöscht wird.
Das ist mein code:
PHP
$fields = array(
'author' => '<div id="lefty"><p class="comment-form-author">' . '<input id="author" name="author" type="text" value="Name" onfocus="if (this.value = "Name") {this.value = "";}" onblur="if (this.value = "") {this.value = "Name";}" ' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . '/></p>',
'email' => '<p class="comment-form-email">' . '<input id="email" name="email" type="text" value="Email" onfocus="if (this.value = "Email") {this.value = "";}" onblur="if (this.value = "") {this.value = "Email";}"' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p></div>',
);
leider funktioniert er nicht. :-( hab schon rumgefummelt mit den ' und " aber wenn ich ' anstelle von " bei onblur und onfocus benutzte sagt er es wären Syntaxfehler. Hat einer eine Lösung? :?: