Skip to content

Commit

Permalink
Item12466: A_VALUE needs to expand to mapped value
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/branches/Release01x01@16677 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Apr 23, 2013
1 parent 9a42351 commit e48c85a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/lib/Foswiki/Form.pm
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,11 @@ sub renderForDisplay {
# Legacy; was %A_TITLE% before it was $title
$row =~ s/%A_TITLE%/\$title/g;
$row =~ s/%A_VALUE%/\$value/g; # Legacy
$text .= $fieldDef->renderForDisplay( $row, $fm->{value} );

# display => 1 gets mapped values (rather than raw)
$text .=
$fieldDef->renderForDisplay( $row, $fm->{value},
{ display => 1 } );
}
}
return '' if $hasAllFieldsHidden;
Expand Down
2 changes: 2 additions & 0 deletions core/lib/Foswiki/Render.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,8 @@ sub renderFORMFIELD {
my $value = $field->{value};
$text = $default if !length($value);
$text =~ s/\$title/$title/go;

# raw field value
$text =~ s/\$value/$value/go;
$text =~ s/\$name/$name/g;
if ( $text =~ m/\$form/ ) {
Expand Down

0 comments on commit e48c85a

Please sign in to comment.