[pmwiki-users] Linking WikiForms to WikiForms

John Rankin john.rankin at affinity.co.nz
Tue Aug 22 19:05:42 CDT 2006


On Tuesday, 22 August 2006 5:37 PM, Hsing-Foo Wang <hsingfoo at gmail.com> wrote:
>ps. If the (:wikiform:) directive could hold the parameters groupname
>and pagename, I guess it could do the job...
>
>e.g. (:wikiform $GroupName $PageName:)
>where $Groupname stands for 'issues' or 'activities' and $PageName
>stands for '00001', the current projectnumber.
>
>The new form (although I am in the projectsgroup) will be created in
>the $Groupname and the $PageName is a hidden parameter in the new
>form.
>
>Thoughts? Did I miss this possibility?

You can write (:wikiform fieldname=fieldvalue:) to force a
specified field to have the specified value. However, I'm
not sure if that will help you in this case.

I think the question you are asking is: "how do I create a new 
issue or activity for the current project?"

To do this, there are 2 options:

- put "new issue" and "new activity" forms on each project page

- provide a link on each project page to a suitable NewIssue and
  NewActivity page

I think the second option is tidier.

At the moment, the (:wikiform:) directive creates entries in the
current group, to a template it looks for in various places.

It would be relatively easy, if necessary, to add a feature for 

    (:wikiform group=GroupName:)

This would post new records to the specified group. However,
I don't think this helps, but I might be missing something.
It also causes a potential problem if you have a field called 
group.

At the moment, you can create a link like this on each project
page:

[[P{$Name}-Issue/New Issue]]

This will take you to the New Issue page for the current project's
Issue group (eg P00003-Issue.NewIssue).

You could also create a link like this:

[[Issue/NewIssue?project={$Name} | New Issue]]

BUT: what you *can't* do at the moment is pick up the project
name on the NewIssue page:

(:wikiform project='value in the url from the project page':)

Even if you could, we'd have to take care of the case where
you get to the NewIssue page from somewhere else and don't
know the project number.

I think this confirms my previous post that the first
design decision is whether to have the project number
as an attribute of each issue and activity, or have 
separate issue and activity groups for each project.
That is: either there is an Issue group with a project 
field, enabling you to find all the issues for a
given project; or there is a Pnnnnn-Issue group for
each project.

Once you have made that decision, we can explore the
implementation issues. My instinct is that the way
wikiforms works, having the project as an attribute 
will cause all sorts of problems.

-- 
JR
--
John Rankin







More information about the pmwiki-users mailing list