Item10345: FORMFIELD renders 'format' text with 'default' value as $value
Priority: Normal
Current State: Closed
Released In: 1.1.3
Target Release: patch
Applies To: Engine
Component:
Branches:
If a form field is empty,
FORMFIELD
has a parameter
default
to set the default text. The documentation says: "Text shown if the field is defined in the topic, but the field value is empty". But something else happens:
Test on this topic (while field Component is left empty):
%FORMFIELD{
"Component"
format="Component: $value"
default="(no Component value given)"
alttext="field Component does not exist in topic form"
}%
renders as:
(no Component value given)
So the macro uses the value of
default
for
$value
. Which is unexpected and wrong according to the documentation.
What happens with a non-existent form field?
field Blo does not exist in topic form
Nothing wrong there.
--
ArthurClemens - 12 Feb 2011