SID-00146: Using forms and templates
| Status: |
Answered |
TWiki version: |
4.2.4 |
Perl version: |
5.10 |
| Category: |
CategoryForms |
Server OS: |
Win Server 2003 |
Last update: |
16 years ago |
I would like to do the following using TWiki:
1. User wants to create a new standard page.
2. The edit mode will open the edit zone (where a template can be visualized) and a form (because it it attached to the template).
Question:
1.How can I make such that at the first editing I can see only the Form that needs to be completed and not the edit mode.
2.How can I manage such that after saving the data from the form is displayed only in the template, but not in the form at the bottom at the page?
--
RoxanaCraciun - 02 Mar 2009
Discussion and Answer
1) Include these lines in the template that creates the topic to overload the Edit action to use your form instead of the full-screen editor (and include a textarea in your form for any text that is to be included:
<!--
* Set VIEW_TEMPLATE = (Your)View
* Set EDITACTION = form
-->
(optional) You might want to hide the table row above the form that normally lets the user replace the form: See
RemoveFormNameFromFormDisplay.
Note that if you edit this topic now, you will only see the form! A work-around to get past that to the text editor is click "Save and Continue".
2) To hide the form at the bottom, see my comment in
AttachmentTableGone
--
SeanCMorgan - 02 Mar 2009
Thank you very much...it really helped!
One more question though; form me the code which is supposed to remove the form name does not work, I mean this code
Any idea why? Doesn't it have to be placed on the form page? or on the template page? Anyhow i tried both and it doesn't work:(
--
RoxanaCraciun - 03 Mar 2009
I don't know why removing the form name isn't working any more (it doesn't work on that Support page either).
Here's another way: similar to
TWiki:Support.HowToHideReplaceFormButton
except I hid the row instead of just the button:
- Copy
/templates/form.tmpl to form.noreplace.tmpl
- In the copy's
<table class="twikiFormTable"> change <tr> into <tr style="display:none">
- Set the cover for the topic (in the template) with a TWiki variable:
Set COVER = noreplace
--
SeanCMorgan - 03 Mar 2009
ok...now it works!

Thanks!
--
RoxanaCraciun - 04 Mar 2009
Sorry to reopen this question. But how do things change when using
NatSkin? Because it does not recognize any of the settings that work for pattern skin.
If i put in the url ;action=form, it works, otherwise it just ignores it.
I am also interested in displaying only the information from the form in a template and not the form under the topic.
Thank you!
--
RoxanaCraciun - 02 Apr 2009
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
PeterThoeny - 2009-06-02
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.