Page MenuHomePhabricator

Values= does not seem to work with show on select functionality
Closed, ResolvedPublic

Description

Author: mitchell_neill

Description:
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:

{{{fieldEthnic Origin Groupdefault=Not Disclosedshow 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:

{{{fieldOriginvalues=British,Irish,Any other White origin}}}
}

</div>
<div id="black">
{| class="formtable"
! Choose:

{{{fieldOriginvalues=Caribbean,African,Any other Black origin}}}
}

</div>
<div id="asian">
{| class="formtable"
! Choose:

{{{fieldOriginvalues=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.


Version: unspecified
Severity: major

Details

Reference
bz24113

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:03 PM
bzimport set Reference to bz24113.

mitchell_neill wrote:

Unfortunately this problem is worse than I thought. It does not work with property= either.

e.g:

<div id="black">
{| class="formtable"
!

{{{fieldEthnic Originno autocompleteproperty=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.

Hi Neill,

Are either of these still a problem with SF 2.0?

mitchell_neill wrote:

Hi Yaron.

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

Cheers
Neill.