NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item9693 for docu changes for 1.2 and 2.0.
Item10345: FORMFIELD renders 'format' text with 'default' value as $value
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Normal |
Closed |
Engine |
|
|
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