Foswiki General Assembly will be held on 28th November 2019, 1200 UTC on Freenode IRC channel #foswiki-association. See AgendaTenthGeneralAssembly

Item13520: FORMFIELD macro fails to return text in a format that can be rendered. Workaround available.

Priority: Urgent
Current State: Closed
Released In: 2.0.1
Target Release: patch
Applies To: Engine
Component: FORMFIELD
Branches: master
Reported By: GeorgeClark
Waiting For:
Last Change By: GeorgeClark
On Foswiki 1.1.9, the FORMFIELD macro would return text that was then properly rendered as TML. On Foswiki 2.0, the returned data renders as (mostly) raw.

Crawford found the issue. The underlying system is returning <br> instead of $n newline, which breaks the TML.

Workaround, For in-topic references, replace FORMFIELD with QUERY.

%SEARCH{"Somefield" type="query" web="web" topic="topic" newline="$n" format="$formfield(Somefield)"}%

-- GeorgeClark - 13 Jul 2015
diff --git a/core/lib/Foswiki/Macros/ b/core/lib/Foswiki/Macros/
index c1fa840..4fb4323 100644
--- a/core/lib/Foswiki/Macros/
+++ b/core/lib/Foswiki/Macros/
@@ -87,7 +87,8 @@ sub FORMFIELD {
             $name, $format,
                 showhidden => 1,
-                usetitle   => $field->{title}
+                usetitle   => $field->{title},
+                newline => '$n'
         $text = $default unless length($text);
-- Main.CrawfordCurrie - 13 Jul 2015 - 16:43

ItemTemplate edit

Summary FORMFIELD macro fails to return text in a format that can be rendered. Workaround available.
ReportedBy GeorgeClark
Codebase 2.0.0
SVN Range
AppliesTo Engine
Priority Urgent
CurrentState Closed
Checkins distro:5e785ef971bd
TargetRelease patch
ReleasedIn 2.0.1
CheckinsOnBranches master
masterCheckins distro:5e785ef971bd
Topic revision: r5 - 03 Aug 2015, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy