[Pmwiki-users] search field breaking my (very special) skin

Thomas -Balu- Walter list+pmwiki-users
Mon Mar 22 06:06:46 CST 2004


As I've send to the list lately I am using a small hack to extend the
edit form if you are previewing the page.

PageEditFmt ends in $unextendedForm which is set in my skin file as
follows:

$unextendedForm = '</form>';
if ($preview) $unextendedForm = '';

However if you have a [[$Search]] tag in the page this will give
problems as the input field for the search field is called "text" too.
So on the next preview or save the edit field contains $Needle which was
the last input field with the name "text" on the page...

Besides heavily voting for a different name of search- and edit-field in
the next major release I am doing the following right now as a
workaround:

if ($preview) {
    $SearchTagFmt = "<form class='wikisearch'
        action='\$ScriptUrl/$[Main/SearchWiki]' method='get'><input
        class='wikisearchbox' type='text' name='foobar' value=''
        size='40' /><input class='wikisearchbutton' type='submit'
        value='$[Search]' /></form>";
}

-- Balu



More information about the pmwiki-users mailing list