Skip to content

Commit

Permalink
formating the concpet_id value to a numeric string
Browse files Browse the repository at this point in the history
  • Loading branch information
mozzy11 committed Mar 15, 2019
1 parent 521d14f commit df7e3ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion omod/src/main/webapp/tags/conceptField.tag
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
<c:if test="${not empty initialValue}">
// fetch the concept object they passed the value in of and do the normal "select" stuff
DWRConceptService.getConcept("${initialValue}", function(concept) { func${escapedFormFieldId}AutoCompleteOnSelect(concept); });
DWRConceptService.getConcept(convert("${initialValue}"), function(concept) { func${escapedFormFieldId}AutoCompleteOnSelect(concept); });
</c:if>
<c:if test="${not empty showAnswers}">
Expand All @@ -76,6 +77,10 @@
})
function convert(conc){
return conc.replace(/[^\d.]/g,'');
}
function func${escapedFormFieldId}AutoCompleteOnSelect(concept, item) {
var conceptId = concept ? concept.conceptId : null
Expand Down

0 comments on commit df7e3ee

Please sign in to comment.