> Is it possible to have a html-form in a Wikipage where
a user can fill out
some textboxes/dropdown menues ...
> And after that the user press a submit
button and a macro is called which inserts some values into
the database?
> How would the "action" of the form would
look like?
I use the AddComment
macro at trac-hacks, and have looked at the source
previously and noted some
neat tricks:
http://trac-hacks.org/browser/addcommentmacro/0.9
/AddComment.py
It seems to handle it directly in the macro by calling GET
on the same
wiki page, and then taking the relevant actions 'inline'
based on the current
request/HDF context. As long as you call GET (form method)
on a wiki page,
all is normal as far as the wiki is concerned but you will
need to detect
and infer the needed information.
Another way would be to have a plugin
that extends both the wiki syntax provider (for rendering a
form), and implements
a requesthandler on /handlemyform (or something) that
acually gets called
by the action. It can then redirect back to referrer, show a
'success' page
with information, or similar.
:::simon
simon coderesort.com
_______________________________________________
Trac mailing list
Trac lists.edgewall.com
http:
//lists.edgewall.com/mailman/listinfo/trac
|