Liam W
in memoriam 1998-2020
Do you have an example to add validation to a simple text field?
On a seperate point, I now need to use Forum.php instead of Node.php .....
Is there a _presave method on the "forum"?
I had this in the old filePHP:protected function _preSave(){ if (XenForo_Application::isRegistered('newthread_button_title')) { $this->set('newthread_button_title', XenForo_Application::get('newthread_button_title')); } else { $this->set('newthread_button_title', ''); } return parent::_preSave(); }
The _preSave method is in the abstract datawriter, it's always available.
(However, it's marked as final in discussion and discussion message data writers, you have to use _messagePreSave and _discussionPreSave instead).
Liam