Tags:
create new tag
view all tags

SID-00058: Edit Template and Edit Custom

Status: Answered Answered TWiki version: 4.2.4 Perl version:
Category: CategoryForms Server OS: Last update: 17 years ago

Hello everybody,

I need help on how to do a “Custom EDIT” and a “Custom VIEW”…

The thing is that I found a way to develop a html form for Twiki, in which you first create a regular twiki form, then you create a topic in which you call all fields from the form with the variable FORMFIELD… all this is already done and it works, but I uderstad that for all this to be effective I need to do a custom EDIT and a custom VIEW… so I think that this refers to the twiki files "edit.tmpl", "edit.pattern.tmpl", "view.tmpl", "view.classic.tmpl"… if this is the case, I would like to know how to create my own edit.tmpl but with a different name so I can be able to call it from only specific webs.

Thank you

-- MartyReal - 27 Jan 2009

Discussion and Answer

I dont think you need to create a template for that. You can use a html form inside de topic with the action on the save script. As long as you match the names of the inputs with the names of the fields it will save the values to your topic when submitted. Set the initial values of the html form with the FORMFIELD variable.

A cleanner approach would be to create a topic with this html form (e.g. EditFormValues) and in the FORMFIELD calls set topic="%URLPARAM{"editedtopic"}%. So you can use this page to edit any topic with form field values passing the topic name in the editedtopic parameter. You can use in every topic an edit-this-topic link like this

[[%SCRIPTURL{view}%/%BASEWEB%/EditFormValues?editedtopic=%TOPIC%][Edit this topic]]

or include the html form in the topic

%INCLUDE{"EditFormValues" editedtopic="%TOPIC%" }%

That way you can make future changes to your form in EditFormValues wich will be reflected in every topic.

-- EnriqueCadalso - 04 Feb 2009

      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 Edit Template and Edit Custom
SupportCategory CategoryForms
TWiki version 4.2.4
Server OS

Web server

Perl version

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2009-02-04 - 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.