[pmwiki-users] Fun with forms - 3 ideas

Petko Yotov 5ko at free.fr
Thu Apr 19 21:47:00 CDT 2007


On Friday 20 April 2007 03:05, Patrick R. Michaud wrote:
> > 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.
>

Cool (just verifying that recipes would be able to do that, and it's great)!


> > * 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 '&#3a;)'.  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.  :-)

Yes, it is brilliant!

This is the best new feature, Patrick, it will allow to do amazing new things 
with PmWiki! Such as, creating super slick template pages with 
divs/tables/styles and let the users edit only the text strings : no more 
need to learn all markup: a form field for the title, description, a 
select-list for the category, etc...

This is absolutely great, I bet in a while most new recipes for functional 
extensions will use this feature.

Thanks,
Petko





More information about the pmwiki-users mailing list