Add 'values from query' parameter for the 'field' tag

Assigned To
Needs Triage

Author: katkov.juriy

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.

  1. 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}}

  1. 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

Version: master
Severity: normal

bzimport set Reference to bz40629.
bzimport created this task.Via LegacySep 29 2012, 10:50 PM
duplicatebug added a comment.Via ConduitNov 24 2012, 9:50 PM

Merged gerrit 25755 links here, bug maybe resolved

duplicatebug removed a subscriber: duplicatebug.Via WebDec 13 2014, 11:28 AM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.