[pmwiki-users] Conditional processing of FoxForms
Martin Kerz
mkerz at me.com
Fri Jul 3 08:13:54 CDT 2009
Hi,
I have a FoxForm that has the ability to upload a picture to a page.
Is it possible to differentiate on the result on the target page,
depending on whether a picture was actually uploaded or not.
At the moment I have on the target page:
%lframe%Attach:{$$foxgroup}/{$$name}/{$$upfile_name}
If no picture is uploaded I want a placeholder image that is already
on the server, i.e.
%lframe%Attach:{$$foxgroup}/{$$name}/placeholder.png
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?
Thanks a lot in advance.
Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090703/52758376/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2428 bytes
Desc: not available
Url : http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20090703/52758376/attachment.bin
More information about the pmwiki-users
mailing list