Opened 9 years ago
Closed 9 years ago
#34170 closed enhancement (fixed)
Add form class argument to comment_form()
Reported by: | flixos90 | Owned by: | DrewAPicture |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Comments | Keywords: | has-patch dev-feedback |
Focuses: | template | Cc: |
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.
Attachments (2)
Change History (6)
#2
@
9 years ago
- Milestone changed from Awaiting Review to 4.4
Hi @flixos90, thanks for the patch. Could you also add the new argument to the list in the 4.4.0 changelog entry in the DocBlock please?
Patch to address the issue (includes docs)