You are here: Foswiki>Tasks Web>Item10294 (05 Jul 2015, GeorgeClark)Edit Attach

Item10294: FORMFIELD clumsy rendering multi-line content, missing ItemTemplatefield() 's linebreak features from SEARCH.

Priority: Enhancement
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Engine
Component: DataForms, FORMFIELD
Reported By: KiltBear
Waiting For:
Last Change By: GeorgeClark
I believe that the FORMFIELD macro helps eliminate the need to do a SEARCH on a topic to render a single specific field. With that being the case, some formfield values have BReaks in them.

So if the formfield Overview has linebreaks in it:

This table gets broken by the line breaks:

|  *Overview* | %FORMFIELD{ "Overview" topic="%BASEWEB%.%BASETOPIC%" }% |

This table does not get broken by line breaks:

|  *Overview* | %SEARCH{  "." type="regex" nonoise="on"  format="$formfield(Overview)" web="%BASEWEB%" topic="%BASETOPIC%" newline=" " }% |

Can we get VarFORMFIELD to accept newline=" " sort of thing?


-- KiltBear - 27 Jan 2011

See also (closed as duplicate): Item10878.


Set as enhancement.

Problem: $formfield() uses Foswiki::Form...renderForDisplay() to render fields. Traditionally, FORMFIELD was the only way to render the exact value of a field without being decorated/mangled by the DataForms field type. VarMETA renders via Foswiki::Form...renderForDisplay() too.

We also have VarQUERY these days, but I'm not sure that we should go ahead and "break" FORMFIELD as well. But then, this would be an optional, new parameter... I guess it seems harmless. In an ideal world though, FORMFIELD would be consistent with SEARCH's $formfield() frown, sad smile

-- PaulHarvey - 30 Jun 2011

Isn't this followed up by Item11833 and the feature proposal ConsistentFormFieldValues?

-- FranzJosefGigler - 14 May 2012

Michael, You've done a lot of work in this area on Item11833 ... could you evaluate if this is still an issue on 1.2, or can we No Action it?

-- GeorgeClark - 06 Jan 2015

This is fixed. Foswiki::Form::renderForDisplay does all the escaping required.

-- MichaelDaum - 07 Jan 2015

ItemTemplate edit

Summary FORMFIELD clumsy rendering multi-line content, missing $formfield() 's linebreak features from SEARCH.
ReportedBy KiltBear
Codebase 1.1.3, 1.1.3 RC1, 1.1.3 beta1, 1.1.2, 1.1.1, 1.1.0, 1.1.0 beta1, trunk
SVN Range
AppliesTo Engine
Component DataForms, FORMFIELD
Priority Enhancement
CurrentState Closed
TargetRelease major
ReleasedIn 2.0.0
Topic revision: r7 - 05 Jul 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