[pmwiki-users] including Wikiform issue in a page

John Rankin john.rankin at affinity.co.nz
Mon Nov 14 19:45:51 CST 2005

On Thursday, 10 November 2005 3:40 AM, nexyufuli evo <noskule at gmx.net> wrote:
>Use wikiform as a contact form ( with name, adress, phone, ... . ) in 
>the Profiles.UserName pages. There would be a template for the profiles 
>page with (:includeform {$Name}:).  So on one side, there is a formpage 
>on the Profiles.Username and on the Profiles.HomePage  where the  
>(:wikilist:) table with all the entrys shows up.
>So every new user inserts his contact itms and gets automaticly updated 
>in the wikilist on Profiles.HomePage.
> But there is a problem. New pages are generated manualy with the 
>(:wikiform:) directive, and the name of the entry is a number. Could 
>there be a configurable solution for using words for the entrys instead 
>of numbers, or some complytly other solution to do it?
See the new version at http://www.pmwiki.org/wiki/Cookbook/WikiForms

First, note that a wikiform-i18n-xx.php file is now required, for
translations of display elements.

The script now supports ?action=editeform for any pagename, not 
just pages it automatically numbers. To achieve the effect you
want, let's test the following:

1. Create a Profiles.GroupFooter page containing:

=>[[{$FullName}?action=editeform | Edit Form]]

2. Add (:nogroupfooter:) directives to the Profiles.FormTemplate,
   Profiles.HomePage and Profiles.RecentChanges pages (and any other
   profile pages that shouldn't use the form)

3. The problem is how to use the form when we create a person's
   profile page. I suggest the following:

-  for the Profiles group, set

   $DefaultPageTextFmt = 'Describe [[$Name(?action=editeform)]] here.';

   in config.php

   this /should/ make the default text shown when the page doesn't
   exist use the Profiles.FormTemplate if you click the link

-  now we need to prevent links to profile pages from generating
   action=edit if the page doesn't exist; set


   in config.php

4. Unfortunately, we aren't quite there yet. The (:wikilist:)
   directive looks for page names that are all digits, so it's
   not going to find any of the pages created using the above
   method! This ought to be possible, but I don't have an
   answer at the moment.

So I think this should be part way to what you want. We need to 
test that the above approach does, in fact, work as envisaged.

There are some other enhancements requested for this script:

- (:wikilist group=GroupName:) to generate a list of pages
  from another group

- provide a way for wikilist to display the last modified date

- provide a way to associate 2 different forms with the same
  page, with access to different fields

The first 2 look easy; the third looks hard.
John Rankin

More information about the pmwiki-users mailing list