Pasting from excel adds a space & the JS doesn't recognise it
I have a drop down with 80+ code numbers in it. Depending on the code chosen, a specific sentence appears further down the document using this JS (obviously only part of it):
var selectedProducts = this.getField("Code off 2").value;
if (selectedProducts=="...") event.value = " ";
else if (selectedProducts=="A21305" || selectedProducts=="A40005" || selectedProducts== "A50005" || selectedProducts=="A55005" || selectedProducts=="A80005" || selectedProducts=="A90105" || selectedProducts=="A90205" || selectedProducts=="A92005" || selectedProducts=="A99005") event.value = "Remise de 5% sur tarif en vigueur des encres et étiquettes";
The drop down is also set to accept custom text so the users can copy and paste the code from an excel sheet. This is where the problem is happening. If you copy the cell, it includes a space after the number so the JS for the sentence doesn't recognise this. If you remove the space, it works fine.
Does anyone know of an easy fix for this please? I don't know enough to make adjustments to the JS to make it pick up the code with and without a space, other than literally duplicating what's there.
Thank you!
