[pmwiki-users] wikiform recipe update (have a large text field with default text)

john.rankin at affinity.co.nz john.rankin at affinity.co.nz
Wed Nov 12 01:33:59 CST 2008

>    1. Re: wikiform - have a large text field with default text?
>       (david roundell)
>    3. wikiforms - have identifiable page names rather than
>       numerical (david roundell)
>>Currently, the wikiform template syntax does not support default textfor
>> textarea boxes. It should be fairly easy to add, but I'll need toreview
>> the syntax for other field types, to make sure I add it in a waythat is
>> consistent with other default value settings. It will probably be a few
>> days before I get time to do this.
> thanks john, i appreciate the time and effort!

Try installing the latest version 1.70 (just uploaded), then define

:Some prompt text:fieldname (text=3*80 Default text value)

This seemed the tidiest solution -- there was no obvious reason to
put the text inside quotes, for example. The default text can be as
long as you like, but cannot contain a newline character.
>  ----
> Subject: [pmwiki-users] wikiforms - have identifiable page names
> 	rather than numerical
> ...
> to search on a server for example: server123a this would also reference
> server123b at the other location if the search criteria was for 123.
> currently this would pick up both pages as, for example: Main.00001 and
> Main.00002 as both share similar names.
> the comments received so far are obvious - how does the user know without
> clicking through, which server is which.
> i appreciate the complexity involved in the naming standard for wikiforms
> but wondered if the answer given in the first question could take the
> place of Main.nnnnnn.
> for example using the first question on the form -
> :servername:server what is the server called? (text=50) - the text entered
> being server345 would result in the pagename being Main.server345.

If I had $100 for every person who has asked for pagenames that don't use
sequential numbers, I could possibly afford to take the time to develop a
suitable solution. The 2 main problems to be solved are:

- how does the forms recipe know whether an arbitrarily-named page
   can be edited through a wikiform template?

- how does the recipe recover when the author fills in the form for a new
   page, presses 'Submit' and the recipe discovers the page already exists?

The best option is to use the "title" field type:

:Some prompt text:fieldname (title=50)

This will wrap the field value in a (:title:) directive (and unwrap it
when you
edit the page). Then, in your search, you need to use a custom pagelist that
uses the [[{$FullName} |+]] markup, so PmWiki uses the page title rather
than the page name to display the results of your search.

This should go a long way towards solving the problem. Hope it helps.


More information about the pmwiki-users mailing list