-
Notifications
You must be signed in to change notification settings - Fork 902
Closed
Labels
Description
T26065 - Is there any built-in-function available in a Survey JS to make the question value as lowercase or uppercase?
https://surveyjs.answerdesk.io/internal/ticket/details/T26065
The = operator is case-insensitive by default and can be made case-sensitive by enabling the settings.comparator.caseSensitive option. However, the contains operator is always case-sensitive.
@andrewtelnov Could you please clarify whether the contains operator is intentionally case-sensitive by default because it is typically used for substring matching and is expected to be strict, as lowercasing everything might hide real differences or create unexpected matches?
Example 1: Use =
{
"pages": [
{
"name": "page1",
"elements": [
{
"type": "text",
"name": "question1"
},
{
"type": "text",
"name": "question2",
"visibleIf": "{question1} = 'TEST'"
}
]
}
]
}
Example 2: Use contains
{
"pages": [
{
"name": "page1",
"elements": [
{
"type": "text",
"name": "question1"
},
{
"type": "text",
"name": "question2",
"visibleIf": "{question1} contains 'TEST'"
}
]
}
]
}
Reactions are currently unavailable