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

Patrick R. Michaud pmichaud at pobox.com
Tue Sep 6 17:56:38 CDT 2005


On Wed, Sep 07, 2005 at 10:14:38AM +1200, John Rankin wrote:
> On Wednesday, 7 September 2005 9:01 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >Another possibility is something like:
> >
> >   (:input menu 
> >       "First item"
> >       "Second item"
> >       "Third item" :)
> 
> FWIW:
> 
> The wikiforms recipe went a completely different syntax route, but the 
> requirements and markup chosen may have some useful input to the syntax.

Indeed, this is a good thought.

> If it's useful, I'm happy to point at some example form templates
> and how they get displayed.

And yes, this will be extremely useful as well.

> 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.

This isn't to say that we can't or shouldn't look at unifying
them somehow, but I can envision that for specialized form
building applications it makes sense to use a specialized,
more compact markup for forms, just as it often makes sense
for sites to create custom markup shortcuts for other
purposes.

> Would it be helpful to use our forms as test cases for proposed
> syntax? They are real requirements, integrate with pmwiki and
> are quite demanding. That is: here is an existing template, here
> is the form produced, can pmwiki support this behaviour.

>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.  :-)

I very much like the elegance and terseness of the wikiforms 
markup, it's very quick to use and read for forms that are
organized into tables (or essentially definition lists).
Since there are often lots of applications that want to
present forms as a table of entries to be filled in, 
this may be a case where designing a separate markup is
in fact advisable, if only because it's more writable and
readable for this particular type of application.

I can probably come up with a proposed "concise markup" for
table-based forms, based on the wikiform syntax and also
based on other discussions from late June when admins were
asking for a more wysiwyg-style of form markup that
is easier than (:input:).

> Fortunately, our version didn't break with pmwiki 2.

Finally!  A recipe that *didn't* break with version 2!  :-)

Pm




More information about the pmwiki-users mailing list