Question
I want to created a custom form-edit template that presents only some of the form fields. An example might be to provide an edit screen for topics that use the
Codev.BasicForm but only display the TopicSummary field.
Delving into
form.tmpl, I find some interesting tags such as
%REPEAT%,
%ROWEXTRA%, etc, which, afaict, are not documented anywhere. I'm assuming these tags somehow cycle through all the fields in the form and displays each one. So what format would I use if I only wanted to display specific fields?
Could someone who understands the code that generates
TWikiForms in edit mode help me understand what's going on here and give suggestions about how I could design a custom template for editing form fields?
Thanks!
Environment
--
LynnwoodBrown - 13 Mar 2008
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
Hm, isn't the
WorkflowPlugin supposed to do something simillar?
--
FranzJosefGigler - 14 Mar 2008
Sorry, I don't get the connection, other than that is one of a number of plugins that does extend the basic TWiki form functionality. But I don't see anything in that plugin that helps me create my own custom form-edit screens.
--
LynnwoodBrown - 17 Mar 2008
I spoke with
MichaelDaum today on irc and he indicated that this is even easier than I suspected. Basically, all one needs to do is create template file with an html form (as with the technique I describe in
HowToEditFormfieldsWithoutEdit and demonstrate in
ChangeRequest1001) and then invoke it in conjunction with
edit script, either with
VIEW_TEMPLATE setting or a url parameter (e.g.
?template=MyCustomEditTemplate .
I haven't tested this yet but will report on that later. This opens up the possibility of providing users with a edit view of a form that is not standard (for example to hide form fields they don't need to see) and also having the file-locking benefits of invoking the
edit script.
--
LynnwoodBrown - 25 Mar 2008