From: Ben H. <ph...@gr...> - 2005-10-18 22:41:40
|
On Tue, Oct 18, 2005 at 10:45:19AM -0700, Ben Hartshorne wrote: > Hi, >=20 > I have a form I want my users to fill out. >=20 > What I would like is a wiki page that contains fields they fill out. > The result of submitting the form would be the creation of a wiki page > using the contents of the data they entered. >=20 Looking at the CreatePage plugin... I see that you can create pages of a certain name, and use a template. That might be enough to solve my immediate dilemma - have just a templated wiki page that the users fill out instead of a form. It's ok, since my users are all wiki-wise. =20 However, I'm confused about how one would use the 'vars' option to the plugin. =20 I ran a test like this: > Make Orange's page here: <?plugin-form CreatePage template=3DBenTestTempl= s=3DBenTest/FirstTest vars=3D"name=3DOrange&age=3D32" ?> and my template (BenTestTempl) has this: > !My name is %%name%% >=20 > my age is %%age%% It worked as expected. There was a form box to fill out that had "Bentest/FirstTest" as its default value. Clicking on the button created the page of the name I filled out in the box, and the page created had "My name is Orange. My age is 32" in its content. My question: What is the use of the vars? I can't change them as a user of the page. If I'm going to go to the trouble of writing out the (slightly complex, relative to regular wiki-speak) plugin thing, must I hardcode my variables there? =20 I think I'm missing something. How can I pull these variables in to some sort of dynamic content, so I can ask someone what their name is and how old they are, and then create the page using that information. =20 I guess what I'm trying to say is that I don't see the point of having variables in the page if they're going to be hardcoded in the calling page, so I am convinced that I'm just missing part of the right way to use the plugin.=20 Comments? Thanks, -ben --=20 Ben Hartshorne email: be...@ha... http://ben.hartshorne.net |