SID-01218: Moving a form from the bottom to the top of a page.
| Status: |
Answered |
TWiki version: |
|
Perl version: |
|
| Category: |
CategoryForms |
Server OS: |
|
Last update: |
14 years ago |
I am extremely new at using twiki and any programming in any code... so my question is how do you move an attached form to the top of a page? After I’ve added a form to my chosen topic it automatically goes to the bottom of the page, how would I make it so it is always at the top such as on your personal page...? Sorry if this seems like a stupid question but I just can't figure it out.
--
JackCozens - 2011-06-30
Discussion and Answer
Hi Jack,
here is a solution:
- go to /path/to/your/twiki/templates
- create a file called view.topform.tmpl
- put the following text in view.topform.tmpl:
%TMPL:INCLUDE{"view"}%
%TMPL:DEF{"form"}%%META{"form"}%%TMPL:END%
%TMPL:DEF{"formattop"}%%TMPL:P{"form"}%%TMPL:END%
%TMPL:DEF{"formatbottom"}%%TMPL:END%
make sure the file is owned by your apache user (for linux: www-data).
If you would like to have the form always on top in every topic in your twiki then edit Main.TWikiPreferences and insert:
* Set COVER = topform
If the form should only be on top in a specific topic you can insert the same line in the topic Preferences. Therefore go to the topic, click on "more topic actions" in the toolbar at the bottom of the page and then click on "edit settings". You can also insert the above line to a WebPreferences to have the form on top of every topic in that specific web.
Hope I could help you - I'll mark your question as answered, but feel free to ask if you need more help.
--
CarlaReitzenstein - 2011-07-05
Similar to Carla's recipe, instead of creating a
view.topform.tmpl you can create a TopForm topic with the same content. Then you can activate this with:
* Set VIEW_TEMPLATE = TopForm
Details in
TWikiTemplates.
--
PeterThoeny - 2011-07-06
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.