Summary: FAQ regarding the WikiForms recipe
Categories: Forms

Frequently Asked Questions

Ask your questions regarding the WikiForms recipe here.

Some solutions for common problems can also be found under WikiFormsRecipes.

What does it take to get PmWiki + WikiForm to work properly with Umlauts and other ligatures/accented characters?

As I described on Internationalizations-Talk, I'm currently moving my Wiki from one Windows/IIS-Server to another Windows/IIS-Server. I think I have configured the system correctly now, and all parts of the wiki appear to be working well except for WikiForms. On the old server, WikiForms has been running fine for years, including Umlauts etc.

The symptoms of my problem on the new server are:

  • Wikilist output shows fields as empty if they contain at least one character of the ÄÖÜaäüß set.
  • Editform also shows the form with fields as empty if they match the above condition.
  • Criteria expressions matching the above conditions are considered empty, too.

I'm using PmWiki pmwiki-2.2.46 with the latest versions of wikiform, break_page and extendmarkup.

Any help would be greatly appreciated!

--Henning March 12, 2013, at 10:00 AM

jr solved my above problem (which was caused by using a newer PHP version on the new server) by providing a newer version of WikiForm.php, version 1.77 which is currently included only in the PmWiki2PDF-v2 recipe. Many thanks!

--Henning March 22, 2013, at 06:09 AM

How to get rid of the MarkupExtensions cookbook ?

MarkupExtensions has a lot of side effects on my wiki (spaces are added before accents in titles, also in the AllRecentChanges page so that the names of the files are duplicated in that list, etc), hence i would like to use WikiForms without its dependency on MarkupExtensions. My question is: which parts of MarkupExtensions are used by WikiForms ?

Answer : The only Markup used seems to be =>right (for text aligmement). So you can avoid using You can copy the the MarkupExtensions cookbook by using only lines 325-350 of the extendmarkup.php file in your local/config.php, that is

## {abbr|abbreviations}, {:term:definitions}, =< left & =>right aligned text
if ($action=="print" || $action=="publish") {
    if ($MarkupExtensions['{|}']) {
        Markup("{|}",'>links',"/\{(.*?)\|(.*?\}?)\}/",'$1 ($2)');
        "PSS('$1').' ('.Keep('$2').')'");
    if ($MarkupExtensions['=|'])
    $hide = 2;
} else {
    if ($MarkupExtensions['{|}']) {
        "/\{(.*?)\|(.*?\}?)\}/",'<abbr title=\'$2\'>$1</abbr>');
        "'<dfn title='.Keep(PSS(DfnTitle('$2','$1'))).'>'.PSS('$1').'</dfn>'");
    if ($MarkupExtensions['=|']) {
        '<:block><p style=\'text-align: right\'>$1</p>');
        '<:block><p style=\'text-align: left\'>$1</p>');

How to use PageTextVariables inside a ("default value") ?

I would like to supply a default value in a textbox, whose content is the value of a page text variable, but if i try ("{MyGroup/MyPage$:MyVariable}"), the variable is not interpreted, and i get the string {MyGroup/MyPage$:MyVariable} as a default value instead of the value of MyVariable. How to solve this ?

How can I select on values with negation or boolean OR?

I would like to do something like this:

(:wikilist page=form var="bc,-abc,xyz" -*lastmodified:)

And get any "records" where var contains either bc or xyz but does not contain abc.

This works for pagelist -- is there any way to get similar capability in wikiforms?

How to make "page" links in wikilist output open in new window?

I'd like the numerical "page" links in the table generated by the wikilist directive to open in a new window so that the output of the directive is preserved in the original window (for convenience as well as for performance reasons). Is there a way to do that? For the searchbox, I modified the default pagelist template by simply adding the %newwin% markup, but I don't know how to modify the wikilist output. --Henning March 07, 2008, at 11:14 AM

Does WikiForms work with PerGroupSubDirectories?

I just applied PerGroupSubDirectories to my wiki. Results were good in general, but the wikilist directive did no longer list any entries. Is it possible to configure WikiForms to work with this recipe? (My server response times would benefit.) Thanks for your help! --Henning October 05, 2007, at 07:30 AM

Installation problems and solution

Skipping edit page on pressing "Submit"?

If the new page is to be created immediately (without giving the user the option to edit it first), you can add $WikiFormSubmit = 'post'; to your config.php. (At least it works for me, found out after some reengineering. Confirm? pk 2005-07-07)

How to avoid author profile markup?

How can I remove the link to authors when using the author field type. We are not making use of author profiles, but want the authors name to be saved and viewed in the list.'''

The purpose of the author field-type is to insert profile markup automatically. So just use the default field type, which will generate a plain text box.

I too wanted to do this, so I added the authorplain field type - shi December 20, 2006, at 02:49 PM

"Submit" Where does the data go?

We would like the option to send form data out to any URL-CGI via GET or POST, like any HTML form action url. Is that possible?
It should be; I'll see what I can do...
Great... I look forward to it... meanwhile I would like to try using WikiForms as is now for some uses where this post requirement is not needed. I have my own needs for a bug-form task-form that can live and die right inside the wiki itself. How do I install wikiforms.php?
oops; installation instructions now added
Or you could try BuildForms, which is specifically made for sending data to any script.
When you press 'Submit' the script sends the data with an action='posteform'. You can have WikiForms collect, but not process, data by intercepting $action = 'posteform' and, for example, redirecting the result to another script.

Customize Edit Buttons

To prevent users from click "Edit Page" leaving them only the option to "Edit Form" is wanted...
You can do this by creating a custom skin that omits the Edit Page links. For example, you might have an author skin without them and an administrator skin that includes them.

Field for providing wiki links?

I'd like to use WikiForms for storing issues raised in quality audits, creating two parallel tracking systems, one for the audits and one for the issues. Since I'd like to backlink from issues to audits, a field for providing wiki links would be handy. --Henning May 24, 2005, at 11:17 AM
Use the (group Groupname) field type: if the author enters "page name" in the field, it creates a link to [[Groupname/page name]] jr 19 June

Publish Button?

It seems the new version introduces the Publish button beneath each list? I'm not sure what it does, though - for me, it seems to open the same page again in a new window. I assume it's supposed to do something more useful - maybe my custom skin messed something up there? --Henning June 22, 2005, at 11:49 AM

It's because I want to produce a single report of all open issues, either as an HTML page or as a pdf. The code for this is not yet complete. The version uploaded 27 Jun should make the button go away. If you have the PublishWikiTrail recipe installed, you can enable the Publish option for a wikilist by adding the following line to config.php before the include wikiform.php statement:

    $PublishForm = true;

The output will be in whichever sort order you see on the page when you press the Publish button.

Adding basic data to a page

Just to give you a heads up, I've been using this pmwiki stuff since 2003 and right now neither I or my very very professional designer can make head or tail of your wiki documentation relating to this. Now I'm a regular dunce, but my designer is not, so I'm afraid that says something about the lack of clarity hereabouts. Sorry to be so blunt, but if you want this particular wiki to become a more accepted tech, someone really needs to create some very simple install/setup/example guides. Just my 2c!

No apology necessary -- this is not very easy for this writer to explain, but it makes sense when you see it. To see how this recipe works:

  1. create a new page in a new group on your site called `NewGroup.FormTemplate
  2. copy the markup from WikiFormSample?action=edit into your `FormTemplate page
  3. save your new page, then click the View Form link that should appear
  4. fill in the form and press Submit; you should see the edit preview page
  5. press save; you can click Edit Form to re-edit the content

To understand what's happening, switch back and forth between your `FormTemplate page and the View Form link. This will show how the various markups listed above turn into form fields.

Thanks very much for the explanation. Now I can see that what I want and what this recipe supplies are different. I want to add data to a page, not create a new page each time the form is filled out. I tried doing the FormTemplate instructions as above and this creates a new page. Is there a way of adding data to an existing page via a form? Thanks for your patience. NP

The CommentBox recipe is one example, designed for posting dated comments to an existing page. You may be able to use the script as a starting point for what you want to do, as it shows how to insert text into the current page at the point of the comment box. jr

Using WikiForms and CommentBox together

I want to use WikiForms in conjunction with the CommentBox. 1) CommentBox markup is in the footer for my form group 2) I can add new forms just fine using my template 3) I can add comments just fine to a document created from the form. 4) If I edit the form, all the comments are wiped out. Any ideas? Mark Kesler

There are a couple of options. Declare the last field on the form to be type (text) -- this will load all the comments into that field's textarea whenever you edit the page. Put &nbsp; on the first line of that field's value, so you keep the comments separated from the prompt text.
The other option is to create a Comment group, and people go to a comment page for each form page when they want to add a comment. Then in your forms group create a GroupFooter with

    (:include Comment.{$Name}:)

I couldn't get either of these ideas to work. I did a slight modification of the second suggestion and got the result I was looking for. I used commentboxplus and in the GroupFooter I put:

  (:commentboxchrono Comments.{$Name}:)

  (:include Comments.{$Name}:)
--Mark Barralet?

Managing projects using WikiForms

An interesting thread about using WikiForms to manage projects with related issues, activities, files, discussion. Kinda like PITS on steroids ;-) The idea is to have a project 'dashboard' page with general project information (which is a WikiForm) with listings (clickable) of issues, activities, discussion, which are also WikiForms. It extensivly uses groups and autocreating projectpages based on WikiForm templates. It's a work in progress, but the thread contains a lot of usefull (newish) information. Once 'finished' maybe a description of the system (example diagram) will be posted. See the thread here.

How to have "Cancel" button like to the sample application?

It would be useful a "Cancel" button in addition to "Submit" button when creating new issue. Please advise if anybody know how to do that. Thank you.

Did you try

(:input reset:)

Selecting pages via (:wikilist name=value:)

As I read the documentation it looks like I can select a subset of my pages into a list by specifying name=value in the (:wikilist ...:) markup. I am assuming that "name" is "variable name" from my form. Is that correct? I do not seem to be getting anywhere with it... Perhaps "name" is only some special names such as group, etc.? --PeterBowers October 23, 2007

That's correct, and for me at least it works. I have restricted myself to lower case, letters-only names - maybe it works less well for more complex names? Just an idea ... --Henning November 22, 2007, at 11:13 AM
Yes, it was a problem with variable names. I was using uppercase letters and underscores and it wasn't working. Now that I've restricted myself to just lowercase letters it is working fine. --PeterBowers November 24, 2007