[pmwiki-users] Default form markup questions...
Patrick R. Michaud
pmichaud at pobox.com
Thu Aug 24 13:05:00 CDT 2006
On Thu, Aug 24, 2006 at 05:39:47AM -0400, The Editor wrote:
> Hi list,
>
> Is there any existing way to use page variables to set default for
> textarea values?
>
> It seems the markup could be modified as simply as:
>
> (:input textarea <name> <rows> <cols> :) {$value} (:input textareaend:)
>
> to output
>
> <textarea name="name"> Value </textarea>
Not easily, because the existing (:input textarea ...:) tag already
generates the closing </textarea> markup. So, we'd have to do
some lookahead for an (:input textareaend:), and there are some other
nasty interactions that would need to be handled.
And, of course, it's not clear what would happen if {$value} itself
contained the text "(:input textareaend:)". :-)
> Could the standard markup script possibly be modified for this? If
> not, I was wondering why. I might need to add this to the FAST Data
> project otherwise.
We can see about coming up with ways to pre-fill textarea boxes;
I just hadn't come up with one that I liked yet (and there haven't
been many requests for it, so PmWikiPhilosophy #3 applies).
> Also, on the same subject, are there any alternate markups that allow
> you to set the default values for radio boxes or select boxes without
> having to use an endless bunch of conditionals.
My plans have been to do this through the $InputValues array, but ...
> 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?
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. :-)
Pm
More information about the pmwiki-users
mailing list