Question T13862
Visible to All Users

Convert to UPPERCASE

created 2 years ago

I am building a react app and i want to convert the text entered by user to uppercase. For e.g. i just got one question on the form "Comments". Following is my form json:-
{
"logoPosition": "right",
"pages": [
{
"name": "page1",
"elements": [
{
"type": "text",
"name": "question1",
"title": "Comments",
"textUpdateMode": "onTyping"
}
]
}
]
}
and i am using below code to handle onchanging event
survey.onValueChanging.add(function(sender, options){
if(options.question.getType() == "text") {
if(!!options.value) options.value = options.value.toUpperCase();
}
});
Still the value is not getting updated on the screen to uppercase but from developer tool i can see options.value is converted to uppercase. Do i need to do any additional step to make the converted value appear on screen?

Answers approved by surveyjs Support

created 2 years ago

Hello,
Answered on GitHub. The issue is fixed by this PR. The fix will be available in the next version we will release next week.

Thank you,
Andrew
SurveyJS Team

    Comments (1)

      Thank you