[pmwiki-users] zap alphanumeric chars

The Editor editor at fast.st
Thu Aug 2 12:56:27 CDT 2007


PmWiki has a function like MakePageName() or something.

It would be very ease to set up a ZAP extension like:

function ZAPXpagename($value, $field) {
      $value = FmtPageName($value, 'page');  // or 'name'
      return $value;
      }

Just drop it in a local config file for your form, and it should make
the command pagename available for your ZAP forms.

But for that matter, have you tried the page command? It's supposed to
do that automatically...

Cheers,
Dan





On 7/22/07, noskule <noskule at gmx.net> wrote:
> hi list/dan
> is it somehow possible to remove all none-alphanumeric chars (inkl
> spaces) from a field entry?
>
> I want do do a "new page box". "posteditname" should be cleaned from
> everything not pagenamecompatible.
>
> (:zapform:)
> (:input text "posteditname":)\\
> (:zap editname={posteditname}:)
> (:zap if1="equal '{button}' 'New Blog Post' ?
> nextpage=ContentForms.Blog?editgroup={*$Group}?editname={editname}":)
> (:input submit button "New Blog Post":)
> (:zapend:)
>
> btw, is there a php function that does that?
>
> grz nos
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>



More information about the pmwiki-users mailing list