Last modified: 2010-09-03 09:06:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T26113, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24113 - Values= does not seem to work with show on select functionality
Values= does not seem to work with show on select functionality
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-24 14:49 UTC by Neill Mitchell
Modified: 2010-09-03 09:06 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Neill Mitchell 2010-06-24 14:49:30 UTC
Hi.

I'm running MW 1.15.3, SMW 1.5.1.1 and SF 1.9.1.

When I use values= in conjunction with the show on select functionality of Semantic forms, it doesn't seem to be saving the property value.

For example.

I have in my form:
<b>Please select an ethnic group and then tick the category that best fits your ethnic origin.</b>
{| class="formtable"
! Ethnic Group:
|{{{field|Ethnic Origin Group|default=Not Disclosed|show on select=White=>white;Black or Black British=>black;Mixed=>mixed;Chinese=>chinese;Asian or Asian British=>asian;Other=>other}}}
|}
<div id="white">
{| class="formtable"
! Choose:
| {{{field|Origin|values=British,Irish,Any other White origin}}}
|}
</div>
<div id="black">
{| class="formtable"
! Choose:
| {{{field|Origin|values=Caribbean,African,Any other Black origin}}}
|}
</div>
<div id="asian">
{| class="formtable"
! Choose:
| {{{field|Origin|values=Indian,Pakistani,Bangladeshi,Any other Asian origin}}}
|}
</div>

and in my template:
! Ethnic Origin
| [[Ethnic Origin::{{{Origin|}}}]]

In the form the show on select works and the specified values are displayed. e.g. if I select White, I then get a drop down with British, Irish and Any other White origin. I can then pick on of the values.

However, when I save, the selected value does not appear in the template and is not assigned to the property. If I then edit with form again the selection is not set. All properties are of type string.

Is this a bug?

Thanks
Neill.
Comment 1 Neill Mitchell 2010-07-13 08:15:28 UTC
Unfortunately this problem is worse than I thought. It does not work with property= either.

e.g:

<div id="black">
{| class="formtable"
!
| {{{field|Ethnic Origin|no autocomplete|property=Ethnic Black}}}
|}</div>

Where the Ethnic Black property holds the values: 
African
African American
Caribbean

You save the form and the chosen value is not populated into Ethnic Origin. Edit again and the previously chosen value is not selected.
Comment 2 Yaron Koren 2010-08-25 20:55:11 UTC
Hi Neill,

Are either of these still a problem with SF 2.0?
Comment 3 Neill Mitchell 2010-09-03 09:06:05 UTC
Hi Yaron.

Just tested. It works fine now :) Thanks for the fix.

Cheers
Neill.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links