Foswiki on GitHub is open for business! Next release meeting: Monday September 29, 1300Z

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):

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


ItemTemplate edit

Summary FORMFIELD renders 'format' text with 'default' value as $value
ReportedBy ArthurClemens
Codebase 1.1.2, trunk
SVN Range
AppliesTo Engine
Priority Normal
CurrentState Closed
Checkins Foswikirev:10686 Foswikirev:10687 Foswikirev:10688 Foswikirev:10689
TargetRelease patch
ReleasedIn 1.1.3
Topic revision: r7 - 16 Apr 2011, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License