[pmwiki-users] Conditional processing of FoxForms

Hans design5 at softflow.co.uk
Fri Jul 3 11:14:37 CDT 2009


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

> 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

just thinking about this a bit more....
You say you have

 %lframe%Attach:{$$foxgroup}/{$$name}/{$$upfile_name}

on the target page, but you mean on the template page, yes?

You can use conditional markup with replacement variables
on the template page:

(:if {$$upfile_name} "":)
%lframe%Attach:{$$foxgroup}/{$$name}/placeholder.png
(:else:)
%lframe%Attach:{$$foxgroup}/{$$name}/{$$upfile_name}
(:if:)

Then you don't need a Fox filter for preprocessing at all.


  ~Hans




More information about the pmwiki-users mailing list