[pmwiki-users] Conditional processing of FoxForms

Hans design5 at softflow.co.uk
Fri Jul 3 08:53:46 CDT 2009


Friday, July 3, 2009, 2:13:54 PM, Martin Kerz wrote:

> I would need some kind of preprocessing. I tried a FoxFilter in  
> config.php, that reads the following:

> $FoxFilterFunctions['FoxFixUpload'] = 'FoxFixUploadFilter';

>    function FoxFixUploadFilter($pagename, $fields) {
>      if ($fields['upfile_name']="")
>         {
>         $fields['upfile_name']="placeholder.png";
>         };
>      return $fields;
>    }

> But this unfortunately didn't work. Can anyone help me here?

I would have thought that such a filter function should work, if it
is called in the Fox form. It should be defined before including
fox.php in config.php.

Have you checked that the filter function is used?
You could set for testing purposes in fox.php
$FoxDebug = 5;
Make sure you do not use 'redirect' in the form when testing!
You will get the $fields values echoed.
See what happens to your file name.


  ~Hans




More information about the pmwiki-users mailing list