create new tag
, view all tags

SID-02344: varFORM and $formweb

Status: Answered Answered TWiki version: 6.0.2 Perl version:
Category: CategoryDocumentation Server OS: Last update: 1 hour ago

Is var %FORM% still working in TWiki 6.0.2? %FORM{format="$formweb"}% or %FORM{format="$formtopic"}% doesn't seem to work. I can use %FORMFIELD{"name" format="$formtopic"}% to retrieve the name of the topic containing the form definition, but %FORMFIELD% doesn't support $formweb, so when the form is on another web, I will get a link which is not working.

-- Emiel Van Riel - 2018-02-05

Discussion and Answer

Hm.... According to the source, it seems that $formweb never has worked when the form and topic are in the same web, but you use the form variable from another web. The symptom is that $formweb is expanded to the web where you use the %FORM% variable - is that correct?

If so, then You seem to have found a (yet another) bug. I'll attach the trivial fix. Do you want to file a bug report or should I do it myself?

BTW: If form and topic are in different webs, or if the topic using the form and the topic using the %FORM% variable are in the same web, it's ok.

-- Harald Jörg - 2018-02-05

Harald, since I'm not a programming expert and I even don't know where to look in the source, as you did, it seems best that you make a bug report. In my TWiki %FORM% isn't expanded at all. That is why I was asking if %FORM% is still working in TWiki 6.0.2. Thanks for answering my question.

-- Emiel Van Riel - 2018-02-05

Hello Emiel,

if %FORM% isn't expanded at all, then perhaps you didn't specify a topic which uses a form? In that case, there's just an empty output and no error message. I'm writing that because this is the error I made when I first tried it: for the topic parameter I specified the name of the form, which is just wrong.

Just let me try here with our previous experiment in SID02334DemoTopic:

%FORM{topic="Sandbox.SID02334DemoTopic" header="on" formfields="all"}%

Renders as: %FORM{topic="Sandbox.SID02334DemoTopic" header="on" formfields="all"}%

Oh, drats. It doesn't render at all: twiki.org doesn't run 6.0.2 yet: The FORM variable didn't exist in previous versions.

-- Harald Jörg - 2018-02-05

      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.
Status Answered
Title varFORM and $formweb
SupportCategory CategoryDocumentation
TWiki version 6.0.2
Server OS

Web server

Perl version

Browser & version

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatdiff SID-02344.diff r1 manage 0.6 K 2018-02-05 - 14:45 HaraldJoerg Make $formweb work as desired
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2018-02-05 - HaraldJoerg
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.