-
☆ A M B ☆
- 24,524 Posts
No. How can it? Before the document is created, it has no ID to use in the database to indicate the content of the TV for that document.
However, you should be able to access the POST value for the TV from the form.
-
☆ A M B ☆
- 24,524 Posts
Well, I always use
echo "<pre>";
print_r($_POST) // whatever array or object you want to see here
echo "</pre>";
// if you want to just see the values above
// you can add a line to stop further processing
// exit();
I’ve created a little function I use for this.
function print_me($var, $exit = 0) {
echo '<pre>';
print_r($var);
echo '</pre>';
if ($exit == '1') {
exit();
}
}
And you can call it print_me($_POST); or print_me($_POST, 1);
Does the ’$pm = print_me($_POST);’ work?
Does it work without the function? Does the event get logged?
-
☆ A M B ☆
- 24,524 Posts
Did you check the onBeforeDocFormSave event in your plugin’s System Events tab?
I tried your code, and if I set the second paramater in the print_me function call
$pm = print_me($_POST, 1);
I get a lovely long array of POST values:
Array
(
[a] => 5
[id] =>
[mode] => 4
[MAX_FILE_SIZE] => 1048576
[refresh_preview] => 0
[newtemplate] =>
[stay] =>
[pagetitle] => Testing
[longtitle] => Test document
[description] =>
[alias] => testing
[link_attributes] =>
[introtext] =>
[template] => 3
[menutitle] => Testing
[menuindex] => 3
[hidemenucheck] => on
[hidemenu] => 0
[parent] => 0
[isfolder] => 0
[richtextcheck] => on
[richtext] => 1
[donthitcheck] => on
[donthit] => 0
[published] => 0
[pub_date] =>
[unpub_date] =>
[searchablecheck] => on
[searchable] => 1
[cacheablecheck] => on
[cacheable] => 1
[syncsitecheck] => on
[syncsite] => 1
[contentType] => text/html
[content_dispo] => 0
[type] => document
[ta] =>
This is a test.
[which_editor] => TinyMCE
[tvkeywords] => MODx, CMS, CMF, content, management, content management, framework
[save] => Submit Query
)
if i set the second parameter in the "print_me()" the function works perfectly.
thank you all.