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
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?
Thanks.
--
KiltBear - 27 Jan 2011
See also (closed as duplicate):
Item10878.
Re-titled.
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()
--
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