[pmwiki-users] forms markup (was: Upgrading to 2.0 breaks Input recipe - how to proceed?)

John Rankin john.rankin at affinity.co.nz
Tue Sep 6 18:32:31 CDT 2005


On Wednesday, 7 September 2005 10:56 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
...
>> I would like to move to use the pmwiki markup instead of a local
>> customisation at some point, but it would have to meet all our 
>> requirements. It doesn't make sense to me to maintain 2 markups 
>> for the same function.
>
>I agree, but I'm not entirely sure the two are the same function.
>At the moment, PmWiki's core markup function is intended to provide
>an easy mechanism for wiki administrators to add nearly arbitrary
>forms into wiki pages that can interface to arbitrary CGI scripts.
>My (possibly incorrect) impression of the WikiForms recipe is
>that it's designed to build structured forms (e.g., they all
>seem to be tabular) that interface neatly to creating specific
>sorts of wiki pages.

Well, that was the original intent -- essentially PITS on
Ecstasy. But much to my surprise, when we needed a forms
interface to pass typesetting metadata to the composition
engine, the wikiforms recipe 'just worked'. Even better: if
the reader just typesets the page, without going through a
form to specify layout options, we can use a form template to
set the default metadata values.

You are right that at the moment the code generates a table
from the template data, but it need not. It's up to the 
administrator how to interpret the content of a template
page. Currently, we interpret it at least 3 different ways:

- to generate a table-based form

- to generate a summary list like the PITS home page

- to extract default values to pass to another script
...
>From a cursory look at things my answer is yes, we could use 
>(or extend relatively easily) the core markup to duplicate the 
>forms output by wikiforms.  However, the PmWiki markup to do
>so is a lot less elegant than the wikiforms markup, simply because
>it's intended to be more general purpose than wikiforms (e.g.,
>it's used for Site.EditForm, which I think might be a bit
>difficult to generate using the wikiform markup).
>
>I'll generate a sample page that shows the equivalent (:input:)
>form of ...?n=Wikipublisher.BasicFeatures?action=texprint
>just so we can see how ugly it is.  :-)

At the moment, wikiforms can't readily do an edit form, but
I'll think about it -- it would be easy to extend the markup.
At the moment, press-buttons are assumed, but should be definable.

And it would be easy to create a non-tabular form from a wikiform 
template. It's up to the script how to interpret a template.


-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list