Tags:
create new tag
view all tags

SID-01856: Displaying a topic's parent formfield data

Status: Answered Answered TWiki version: 5.0.2 Perl version: 5.8.8
Category: CategoryForms Server OS: Red Hat Linux Last update: 12 years ago

I'm trying to display formfield data from a topic's parent. I found this topic from 2005:

VariableInFormField

One of the last comments was that this should work in the Dakar release.

This is what I have tried:

%FORMFIELD{"Title" topic="%META{"parent" dontrecurse="on"}%"}%

%FORMFIELD{"Title" topic="%PARENTTOPIC%"}% (turns out PARENTTOPIC isn't available on TWiki 5.0.2)

If I explicitly put the topic name in it works:

%FORMFIELD{"Title" topic="MyParentTopic"}%

-- Joshua Tharp - 2014-01-13

Discussion and Answer

If you use %META you likely need to specify the format and topic parameter. Details in VarMETA.

-- Peter Thoeny - 2014-01-13

Thanks, Peter!

For future searchers...

%FORMFIELD{"Title" topic="%META{"parent" dontrecurse="on" format="$topic"}%"}%

The format term is required because otherwise the %META% variable returns the parent in the form

[[$web.$parent][$parent]]

-- Joshua Tharp - 2014-01-13

      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 Displaying a topic's parent formfield data
SupportCategory CategoryForms
TWiki version 5.0.2
Server OS Red Hat Linux
Web server

Perl version 5.8.8
Browser & version

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2014-01-13 - JoshuaTharp
 
  • 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.