Opened 11 years ago
Closed 11 years ago
#34170 closed enhancement (fixed)
Add form class argument to comment_form()
| Reported by: | flixos90 | Owned by: | DrewAPicture |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Comments | Version: | |
| Severity: | normal | Keywords: | has-patch dev-feedback |
| Cc: | Focuses: | template |
Description
When using the comment_form() function, it is currently not possible to adjust the class of the form. ID can be adjusted, and for example the submit's ID and class can also be adjusted. So I thought it would be straightforward to add the same for the form tag itself.
Use-case: I'm using a theme based on Bootstrap, and I would like to have a horizontal comment form for which I need to apply a class 'form-horizontal' to the form tag. Right now I can only do that by outputting the whole form manually, including all the actions and filters which is a pain to manage when I would rather just create markup. I'd much rather use the built-in comment_form() function instead and only adjust the arguments there.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch to address the issue (includes docs)