Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Ignore case

$
0
0

Is there a way to have the script ignore upper and lower case?

 

I have a script that creates an array of the dropdown items then compares the users input to see if there is a match. The user needs to know to capitilize the first letter or a match will not be found. I want the script to find a match even if they do not capitalize the first letter. here's the script:

 

 

// Check that the user has not typed in a value // that does not exist in the list. If they have// then clear the dropdown. // First create an array of the items in the // dropdown list.
var vUserInput = [];for (var i=0; i<this.length; i++) {
 vUserInput.push(this.getDisplayItem(i));}// Check that the value is not in the arrayif (this.rawValue !== null&& vUserInput.lastIndexOf(this.rawValue) === -1) {
 this.rawValue = null; // clear the dropdown
 xfa.host.beep("3"); // audio alert to the user
 this.ui.oneOfChild.border.fill.color.value = "255,225,225"; // red} 

Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>