[pmwiki-users] Fun with forms - 3 ideas
Patrick R. Michaud
pmichaud at pobox.com
Thu Apr 19 20:05:48 CDT 2007
On Fri, Apr 20, 2007 at 02:40:25AM +0200, Petko Yotov wrote:
> Sorry to not replying in the right thread, but I lost the first message...
>
> 1. We need some kind of form validation, or at least, a way to write a
> function that will intercept the posted data and decide to filter, sanitize,
> save it or not.
I'm leaving this as recipes for now... but we can also do
javascript client-side validation in addition to server-side
validation.
> * if the user enters a smiley ":)" in a text field, which is not improbable,
> and the input gets written inside a (:var:value:) PTV, it will break it --
> so, I imagine an input of ":)" may be transformed into ":-)" and it will
> work.
Actually, the form already handles this -- ':)' inside of a
(:var:...:) gets changed into 'a;)'. Similarly, if someone sends
a newline to a var:... text variable, it's converted to a space.
(We might want to change it so that newline becomes \ or \\. Hey,
it's configurable. :-)
> 2. How about a new "action=editvars" without the need to define a form
> template in the URL, but from a special PTV in the edited page (or in the
> GroupHeader, etc.), like:
> [...]
This can work, as well as creating automatic forms from pages...
but I'm not sure they'll be terribly useful without a lot of
formatting smarts in them. Anyway, it's available for people
to write in recipes.
Pm
More information about the pmwiki-users
mailing list