Author: katkov.juriy
Description:
Currently the 'values from concept' is the only way to get the list of allowed values from some SMW query. I propose to add 'values from query' parameter that will allow to use SMW query language to get the list of pages that will be the allowed values. This parameter will make Semantic Forms more flexible.
For forms that are created from a template there will be a way to specify the allowed values without creating the concepts.
- simple example:
Here is a simplest possible example of the new 'values from query' parameter:
{{field|somename|values from query=[[Category:Flowers]][[Color::Red]]|input type=listbox}}
this will work in the same way as
{{field|somename|values from concept=Red Flowers|input type=listbox}}
- real world example will make use of 'Reusing form elements' feature of Semantic Forms:
Here is the Template:Relation_To_Flowers page:
<nowiki>{{</nowiki>field|somename|values from query=[[Category:Flowers]][[Color::{{{1}}}|input type=listbox <nowiki>}}</nowiki>
Here is the Form:Some form
...//some form definition
{{Relation_To_Flowers|Red}}
Version: master
Severity: normal