Tags:
create new tag
view all tags

SID-00146: Using forms and templates

Status: Answered 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:

  1. Copy /templates/form.tmpl to form.noreplace.tmpl
  2. In the copy's <table class="twikiFormTable"> change <tr> into <tr style="display:none">
  3. Set the cover for the topic (in the template) with a TWiki variable: Set COVER = noreplace

-- SeanCMorgan - 03 Mar 2009

ok...now it works! big grin 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

      Change status to:
ALERT! 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.
SupportForm
Status Answered
Title Using forms and templates
SupportCategory CategoryForms
TWiki version 4.2.4
Server OS Win Server 2003
Web server Apache 2.2.10
Perl version 5.10
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2009-06-02 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.