Wie kann ich dem Formular-Tag Attribute hinzufügen? Unten ist mein Code, aber es fügt nicht die Attribute hinzu, die ich brauche:
$args = array( 'title_reply'=>'', 'comment_notes_before' => '', 'logged_in_as' => '', 'class_form' => 'form-comment form-submit', 'comment_field' => ' ', 'submit_button' => ' ' ); comment_form($args);
Es generiert das form
Tag wie folgt:
Aber ich muss hinzufügen, data-abide novalidate
:
Irgendwelche Ideen?
Verwenden Sie diese function anstelle von comment_form()
function validate_comment_form(){ ob_start(); comment_form(); echo str_replace('