-
- 239 Posts
I am trying to make sure that my users fill in a longtitle when they create a document. My idea was to use the normal title for longtitle if they forgot to fill it in.
I tried to make a plugin that acts on the OnBeforeDocSave event. So I could check if longitle was filled in. If not make the longtitle equal to the normal title. But I only get the id of the document beeing edited from the event. I don’t see a way to get access to the data that is going to be saved.
Am I overlooking something or should I use another approach?
-
- 209 Posts
We developer REALLY NEED a plug-in documentation... I’m sorry to go on asking work... but this will BOOST the development of MODx, since not only the core developer will be aware of the hidden stuff of MODx
Daniele "MadMage" Calisi
madmage, we really agree!
This is an area that we want to do a much better job on and really help folks understand. And I promise that we’re working on it!
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
-
- 1,732 Posts
Quote from: Mitch at Dec 26, 2005, 12:59 PM
I tried to make a plugin that acts on the OnBeforeDocSave event. So I could check if longitle was filled in. If not make the longtitle equal to the normal title. But I only get the id of the document beeing edited from the event. I don’t see a way to get access to the data that is going to be saved.
The data that’s going to be saved can be found inside the $_POST variable. For example $_POST[’longtitle’]
-
- 1,495 Posts
Yep, and you can change the content of that $_POST vars, so that you can fill out any values that you desired.
Btw, how about us, the developer to start building documentation, for example madmage, it seems that you know quite a lot of it, so you can start making a really simple documentation for the doc team to polish it and expand it further.
Don’t ask me to do it though, I’m kinda lazy in writing something, especially documentation.... LOL...