Hi Fer ,
I created a simple sample for you. Check if this is what you want? Basically, to check for numbers you can bind the keypress action to your input box -
inputText.bind('keypress', function (e)
return !(e.which != 8 && e.which != 0 &&
(e.which < 48 || e.which > 57) && e.which != 46);
Thanks and Regards,
TextInputValidation.zip 73.1 K
Sorry for not responding on time, how can I be included in this code?
This code is on my creationComplete and it works fine.
Would greatly appreciate your help.
1 person found this helpful
Hi Fer ,
Where do you want to include this code?
Basically, the setVariable part where you are defining a new variable called typeActivity, Answer_1 should be in creationComplete or compositionReady and maybe the part where you are resetting the variables could be on any button click action or added to the compositionReady event only once the data from the text input box is read.