Priority: Urgent
Current State: Closed
Released In: 2.0.0
Target Release: major
Applies To: Engine
Component: DataForms
Branches: master
In the form
System.UserForm there is a field called Country defined as follows:
| [[%SYSTEMWEB%.CountryList][Country]] | select | 1 | | | |
The %SYSTEMWEB% macro does not get expanded and the field does not show the values in edit mode
When the web is hardcoded as follows it works:
| [[System.CountryList][Country]] | select | 1 | | | |
--
PadraigLennon - 07 Apr 2015
Here is a fix. Needs someone with greater form expertise then me to validate:
diff --git a/core/lib/Foswiki/Form.pm b/core/lib/Foswiki/Form.pm
index beb8247..7d94dc1 100644
--- a/core/lib/Foswiki/Form.pm
+++ b/core/lib/Foswiki/Form.pm
@@ -345,7 +345,7 @@ sub _parseFormDefinition {
if ( $field{title} =~ m/\[\[(.+)\]\[(.+)\]\]/ ) {
# use common defining topics with different field titles
- $field{definingTopic} = fieldTitle2FieldName($1);
+ $field{definingTopic} = fieldTitle2FieldName(Foswiki::Func::expandCommonVariables($1));
$field{title} = $2;
}
MichaelDaum, this probably needs your review. Seems simple enough. Allows use of %SYSTEMWEB% in the form definition. But forms are tricky and I'm hesitant to just check it in.
--
GeorgeClark - 07 Apr 2015
I went ahead and checked the fix in. It resolved the issue padraig_lennon reported on IRC.
--
GeorgeClark - 08 Apr 2015
Good catch.
--
MichaelDaum - 08 Apr 2015