[pmwiki-users] Fox: field substitutions and multiple actions

Jon Haupt jhaupt at gmail.com
Sun Mar 20 13:33:35 CDT 2011


Hi there,

I am wondering if anyone can help me with a Fox quandary. Here is what I
want to do:

A. User fills out a form
B. Form result 1: a page is created with the ftime used to create the page
name (pages are created with the post time as their name); this page is not
viewable
C. Form result 2: Either an e-mail is sent with the result of the form, or
the result is displayed on a success page, for easy printing (since the user
cannot view the resulting page from B)

I can do A and B, but I'm having problems with C.

In order to achieve the post time names, I'm using:

(:input hidden target value='{(ftime fmt="%F-%H-%M-%S")}':)

Unfortunately, it seems that this does not work when you try to specify more
than one target with different actions. Adding this line doesn't work:
(:foxmail template=FoxNotifyLists.ProgramEmailTemplate
target=FoxNotifyLists.ProgramEmailList :)
Nor adding this line:
(:foxadd template=My.Template target=Main.Success put=bottom
foxaction=display:)

Both of those produce the same error: *Warning*: Invalid argument supplied
for foreach() in */my/website/pmwiki/cookbook/fox.php* on line *532*

**I'm thinking perhaps the problem is that I've set the target using the
hidden input line. However, if I try to set it in a foxadd line, like this,
it still results in the same error:

(:foxadd template=My.Template target='{(ftime fmt="%F-%H-%M-%S")}'

Does anyone have any ideas of how I could do this easier or better (or just
make it work at all)?

Thanks,
Jon Haupt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20110320/d962d1eb/attachment.html>


More information about the pmwiki-users mailing list