Editing a page to change the value of a variable is rather unintuitive. Using forms (à la
EvEm) may be a solution for variables
associated to every page in a web, but it is still difficult to be performed by an average user.
I would prefer to have a wiki syntax to specify a variable. Le me use the "normal" Set syntax.
When I write
* Set a = 5
I would like to see in the page
(if the page can be edited, of course).
Let us assume that the action of this form is
updatevalues
If someone changes the value of the
a field in this topic,
and then press a submit button (not shown),
updatevalues takes care of "editing" the page, replacing the old value of
a with the new one.
In this way one can offer people an easy way of writing input forms with a wiki syntax, maybe setting the same variables with different looks.
Actually, my goal is the following: let people use this approach to specify custom variables; attach a document to the topic, fill in the fields and have these variables magically interpolated into the attached document at download (say, using a specific 'action'). This would allow secretaries to use twiki to publish documents and let user fill-in them using forms, all that without programming.
It is not difficult to write down this plugin, but I would like to have your opinions about:
- Is it possible to integrate it seamlessy with the existing code? I mean, leave the "Set a=5" expression in place, and add somewhere in the topic the default value of a, the eventual tooltip, the prompt, and so on..
- If I do not need compatibility, which is the simplest syntax that can be used to specify the type of fields? and maybe also some checking, like range control, etc...
- Which is the simplest syntax to access a topic's variable?
--
FrancoBagnoli - 25 Mar 2002
Somewhat related to this topic is the
EditTablePlugin.
--
PeterThoeny - 12 Apr 2002