Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
PostController_BeforeFormSave_Handler Hook doesn't work
amalfra
New
I was trying to add some additional validation from a plugin before creating a new discussion form submission. Could anyone please help?
Tagged:
0
Comments
It's the DiscussionModel that you have to look into: https://github.com/R-J/AddWPInfo/blob/master/class.addwpinfo.plugin.php#L98-120
Thanks.. That seems to work... But i was trying to add new error msg with $Sender->Form->AddError
but, Call to a member function AddError() on a non-object.
You can use
$Sender->Validation->AddValidationResult('FieldName', 'Error message');
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
That works great. Thanks guys....