Page MenuHomePhabricator

Page Forms: "mapping property" does not work in listbox in multiple-instance templates when editing existing pages
Open, Needs TriagePublic

Description

Ref: discussion on mediawiki.org.

I'm working on a form that will use a multiple instance template. Within each instance, the first field is a simple dropdown. The second field is a listbox, which lists all possible values from a category of pages. The issue is with the second field.

I would like to use the mapping property option to display alternate text than the pagenames. But it seems there's an issue. Even though I selected multiple values and saved the page, and I confirmed the values are set in the page's template call by viewing the source, the form does not display these values as selected upon the next "edit with form" load. Below is a snippet from the form. The field in question is the COMPLETED_APPLICABLE_OBJECTIVES field.

{{{for template|Test event activity module|multiple|add button text=Add activity module|label=Activity modules}}}
{{{field|ACTIVITY_MODULE|input type=dropdown|values from category=Activity module analog|mapping property=Ops Nom}}}

'''Completed objectives:'''

{{{field|COMPLETED_APPLICABLE_OBJECTIVES|input type=listbox|values from category=Test objective|size=40|mapping property=Has text title}}}
{{{end template}}}

Note that I have a similar form that does not use the multiple instance thing and it seems to work with the mapping property. So I wonder if it's an issue with the multiple instance aspect.

Event Timeline

Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptJan 2 2020, 5:09 PM
Yaron_Koren renamed this task from Saved values are not displayed as selected in edit-with-form view for listbox field in multiple-instance template to Page Forms: "mapping property" does not work in listbox in multiple-instance templates when editing existing pages.Mar 11 2020, 1:32 PM