This question about Documentation: Answered but needs rewriting
Hi,
I'm trying to create a simple form where our users can access the topic, make changes and save. So a simple use of the FormPlugin and the FoswikiApplicationData. Is there a simple example for this?
I can get the form up fine, but how do I save the data and retrieve it when they access the topic later?
Thanks
Have a look at Sandbox.FormPluginExamples. It contains an example to save topic text. In a similar way you can save a form value to a topic. The input field name should correspond with the data form field name.
For example with a field named "TitleField":
%STARTFORM{
name="savefield"
action="save"
topic="%WEB%.TestTopic"
}%
%FORMELEMENT{
type="text"
name="TitleField"
title="Title:"
value=""
}%
%FORMELEMENT{
name="action"
type="submit"
buttonlabel="Save field value"
}%
%ENDFORM%
--
ArthurClemens - 20 Jan 2011
Hi Arthur,
Thanks for responding. How would the target wiki page look like that receives and saves the data? And how are the value's retrieved when the form is subsequently accessed? This is where I thought the FoswikiApplicationData plugin came in?
Thanks
The target page must have a form attached. But otherwise it looks the same as any other page.
The form value can be retrieved with
VarFORMFIELD.
I don't know of FoswikiApplicationData and what you could do with it. Do you mean
FoswikiApplicationsContrib? For the scenario you describe this is not needed.
--
ArthurClemens - 21 Jan 2011