Page MenuHomePhabricator

Add 'values from query' parameter for the 'field' tag
Closed, ResolvedPublicFeature

Description

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.

  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
{{Relation_To_Flowers|Red}}


Version: master
Severity: normal

Details

Reference
bz40629

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:50 AM
bzimport set Reference to bz40629.

Merged gerrit 25755 links here, bug maybe resolved

Aklapper triaged this task as Low priority.Feb 4 2022, 8:11 PM
Aklapper changed the subtype of this task from "Task" to "Feature Request".
Yaron_Koren claimed this task.
Yaron_Koren subscribed.

This was finally added in version 5.6.