Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.1.10
-
None
-
Patch available
Description
CFormsSuggest widget does not handle the on value changed event.
in definition:
<fd:field id="xxx">
<fd:label>xxx</fd:label>
<fd:datatype base="long"/>
<fd:suggestion-list type="javascript">
return xxx(filter);
</fd:suggestion-list>
<fd:on-value-changed>
<fd:javascript>
xxx_onValueChanged(event.source.getForm());
</fd:javascript>
</fd:on-value-changed>
</fd:field>
in template:
<ft:widget id="xxx" type="suggest"/>
the patch for CFormsSuggest.js adds the onValueChanged function
onValueChanged: function(/*String*/ value){
if(this.onchange == "cocoon.forms.submitForm(this)") {
cocoon.forms.submitForm(this.domNode, this.name);
}
},
in definition:
<fd:field id="xxx">
<fd:label>xxx</fd:label>
<fd:datatype base="long"/>
<fd:suggestion-list type="javascript">
return xxx(filter);
</fd:suggestion-list>
<fd:on-value-changed>
<fd:javascript>
xxx_onValueChanged(event.source.getForm());
</fd:javascript>
</fd:on-value-changed>
</fd:field>
in template:
<ft:widget id="xxx" type="suggest"/>
the patch for CFormsSuggest.js adds the onValueChanged function
onValueChanged: function(/*String*/ value){
if(this.onchange == "cocoon.forms.submitForm(this)") {
cocoon.forms.submitForm(this.domNode, this.name);
}
},