[pmwiki-users] Misc FAST Data questions

The Editor editor at fast.st
Tue Sep 12 12:56:48 CDT 2006

Hi list,

I have a couple fun questions about some features I'm wanting to build
into FAST Data that I thought perhaps others might have some insight
on.  Most of these are from past posts that I was never able to get
fully solved.  Trying to tackle them now!

1) Multiple buttons.
Suppose I wanted to have multiple buttons on a form, one perhaps to
preview a post, one to actually make  a post, and one to discard (or
some other set of choices).  While I can do any of these things with a
single submit button--how do I distinguish between which button is
pushed?  Right now I process the form info using a line like the
following succeeded by a bunch of specific if statements:

	foreach ($_POST as $field => $value) {

What kind of if statements could I use that would give me the button
clicked?  Once I have that information, I can dynamically recreate the
form field values to accomplish pretty much whatever I want.

2) Passwd's and authentication.
In an early email Pm explained that AuthUserId() authenticates a user
but doesn't supply any password permissions.  That is the function of
PmWikiAuth().  As it stands, the FAST Data Login function only
authenticates for users, but not password permissions.  Could anyone
explain what variables I need to pass into AuthUserId() and whether or
not I need to still use AuthUserId()?  Here's my existing relevant

3) Upload and action problem
In using the FAST Data form you have to set the action = data to call
the recipe on the form submission.  I'd like to use it to
simultaneously allow uploads of pictures, etc, using PmWiki's existing
functions (to store in the right place and make the graphics available
in other pages, etc.), but notice it requires one to set the action to
"postupload".  Assuming I properly set the fields for "uploadfile" and
"upname" elsewhere in the form, is there some function I can call
within the recipe directly by some hidden field flag, like:

(:input hidden upload true:)

My idea is, when this field field is processed, it would call some
PmWiki function (I also need to know the proper format to send in the
required parameters). I would probably set this to be the last action
performed on the form submission, after everything else is saved,
logged, updated, emailed, or whatever.

Thanks in advance...


More information about the pmwiki-users mailing list