[pmwiki-users] Wikiforms questions.

John Rankin john.rankin at affinity.co.nz
Thu Apr 20 17:34:45 CDT 2006


I see the problem. In your form template, remove the spaces 
between : shorttitle so it reads :shorttitle etc.

Explanation below.

On Friday, 21 April 2006 7:33 AM, Richard Crane <craner at haskins.yale.edu> wrote:
>On Wed, 20 Apr 2006, John Rankin wrote:
>
>> This feature is new last week.
>> Are you using the latest version of wikiforms, which is 1.45.
>>
>
>Updating the recipe didn't help much -- now the ViewTemplate is used, but other oddities 
>were introduced.  This is the input form:
>
>--  This defines the layout of a bibliographic form.
>-- 
>--  :Short Title: shorttitle ("Abbreviated title"=40) +*
>--  :Title: title (text=2*55)
>--  :Type: type (Journal Article,Report,Website,Book,Other) +
>--  :Original: original Enter location data here (text=1*60)
>--  :Local Copy: local (text=1*60) +
>--  :Notes: notes (text=10*60)
>--  :Publication Year: pubyear (text=1*15)
>--
>
>This is the ViewTemplate:
>
>--  Title: '''<title>''' 
>-- 
>--  '''Type:''' <type> 
>-- 
>--  '''Year of Publication:''' <pubyear> 
>-- 
>--  '''Original Location''' \\
>--  <original>
>-- 
>--  '''Local Copy''' \\
>--  <local>
>-- 
>--  '''Notes''' \\
>--  <notes>
>
>But what comes out is:
>
>--  Title: Long Term Preservation of Digital Information - Lorie
>-- 
>--  Type: Journal Article
>-- 
>--  Year of Publication: <pubyear>
>-- 
>--  Original Location
>--  JCDL-01, June 24-28 2001
>-- 
>--  Local Copy
>--  <local>
>-- 
>--  Notes
>--  The principal issue addressed is the obselescence of
>software and hardware.
>
>
>If I edit the actual page ( not the "edit form" option), the
>data for <pubyear> and <local> are present.
>
>
>Richard
>
Here is what happens. The template code looks for:

:Prompt text:fieldname Tool tip text ...

Note there is no space between the second colon and fieldname. 
If there is no fieldname, it turns the prompt text into a 
suitable name -- Prompt text becomes prompttext. So in your 
case, because of the spaces in the template, it thinks the 
field names are 
shorttitle, title, type, original, localcopy, notes, publicationyear; 
not shorttitle, title, type, original, local, notes, pubyear. 
Thus pubyear and local aren't found. 

I suspect that the tooltips read, for example: 
"original Enter location data here".

So if you remove the spaces after the second colon, it should work.
The reason there is no space is so that it can distinguish between 
a fieldname and tool tip, yet still work if no fieldname is given. 
There may be a better way to do this...
-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list