[pmwiki-users] Default form markup questions...

The Editor editor at fast.st
Thu Aug 24 14:52:48 CDT 2006

Here's a stab at it...

> > I envision something > like:
> > (:select <name> default="option2" value1|display1 value2|display2 etc :)
> > or likewise
> > (:radio <name> default="option2" value1 value2 etc :)
> What does "option2" refer to in each case?  And in the case of the
> (:radio ...:) markup, what HTML output do you expect it to generate?


(:select State default="OK" TN|Tennessee NY|New York OK|Oklahoma:)

would produce

<select name="State">
<option TN>Tennessee
<option NY>New York
<option OK selected>Oklahoma


(:radio State default="OK" TN|Tennessee NY|New York OK|Oklahoma:)

would produce

<br><input type="radio" name="State" value="TN"> Tennessee
<br><input type="radio" name="State" value="NY"> New York
<br><input type="radio" name="State" value="OK" checked> Oklahoma

Though the default flag should be optional, allowing it would enable
me to retreive and set data from a data page very easily, my goal in
all this:

(:radio Fieldname default="{$Fieldname} ... :)

> For select boxes, my plan is still to implement (:input select ...:)
> as outlined at http://www.pmwiki.org/wiki/PITS/00567, I just
> need sufficient available time + motivation to do it.  :-)

Actually, there already is a simple markup for select boxes in the
FAST Data project that works beautifully. Namely:

(:select Name:)
(:option value1:) Display1
(:option value2 checked:) Display2

It just doesn't allow for the syntax I have above of preselecting
option 5 without a BUNCH of conditionals.  On the other hand, the
syntax I propose above would not allow for dynamic dropdown menu's
(pagelist generated) which is another greatly requested feature.  I
think we need both.

One should be (:input select:) and the other (:select:).  I'm not sure
which should be which.

Similarly, the disadvantage of my proposed radio box syntax is that it
limits some of the formatting things you can do with the current
standard markup syntax.  Again, you really need both.  One could be
(:input radio:) the other (:radio:).  If we can think through a logic
concerning which would be called "input" fields, and which would not
need the word "input" it will make it easier to learn and remember
which is which.

My suggestion is we keep "input" for all the simpler inputs (like the
existing markups) and use the shorter names for more advanced markups.
(This facilitates downward compatibility)  Of course in this scenario,
the markups for select boxes in the FAST Data Project are really the
simple ones and should be called (:input select...) which is fine with

It would be nice if all the markups, both simple and more complex were
available in core.


PS.  I'm on a roll these days, maybe I should try the markups!

More information about the pmwiki-users mailing list