[pmwiki-users] wikiforms - adding new fields?

John Rankin john.rankin at affinity.co.nz
Wed Feb 22 15:02:44 CST 2006


On Wednesday, 22 February 2006 9:14 PM, Hugo Fjelsted Alrøe <Hugo.Alroe at agrsci.dk> wrote:
>We have quite a lot of issues using the wikiforms recipe (thank
>you for a great add-on!). Is it possible to add or delete
>fields in a living group of issues? Or can I change a field by
>changing the <prompt text> (the <variable> seems only to be
>used in wikilist and not in the stored pages)? I tried adding a
>field and this messed up the editing of existing pages in my context. 
>-Hugo
>

Possible, yes; easy, no...

1. Is it possible to add or delete
>  fields in a living group of issues?

You should be able to add or delete fields from the *end* of
a template. I think.

At the moment, to add or delete a field in the middle of a 
page, you would need to edit existing pages with the standard
action=edit to insert or delete the corresponding prompt.

Could wikiforms be made smarter? I can think of 2 options:
a wikiforms is made smart enough to figure out for itself
  that a field has been inserted or deleted
b we introduce a bit of markup in the template to tell
  wikiforms, for example

:+New prompt:newfield

:-Existing prompt:existing field

where the + and - indicate an added or deleted field 
respectively

Option (b) is probaably easier and makes the change visible.
I'd need to do some investigation to work out how feasible
this is.

2. Or can I change a field by
>changing the <prompt text>?

Yes, wikiforms will detect that the field name has changed
but will continue to work. When the edited page is saved,
it will be saved with the new prompt text.


Hope this helps.
John

-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list