Created
August 23, 2012 22:04
-
-
Save hafriedlander/3442554 to your computer and use it in GitHub Desktop.
How to remove a field from the comment form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| Object::add_extension('CommentingController', 'CommentingControllerExtension'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class CommentingControllerExtension extends Extension { | |
| function alterCommentForm(Form $form) { | |
| $fields = $form->Fields(); | |
| $fields->removeByName('URL'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment