We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi. I'm struggling to understand how to use the InputFilter in a textfield According to http://www.sojamo.de/libraries/controlP5/reference/index.html?controlP5/Textfield.html there are four options.
So when i want to allow ONLY Integers the .setInputFilter(ControlP5.INTEGER); is used.
BUT.. what can i do if i want to allow a compination of characters ?
In a date field for example i want to use 31-1-2013 (Integers AND the - symbol). There is a way to allow ONLY the "selected" characters ?
Thank you in advance.
Answers
How about making three separate text fields (day, month, year) that allow only integer input, since the - isn't real 'input' anyway as it is fixed. Plus it will make it easier to do check for correct input: max 31, max 12, etc.
Yes.... i already working on this idea. Thank you.
The question was cause i want to understand HOW TO FILTER the inputs in a textfield.
I have found this http://www.sojamo.de/libraries/controlP5/reference/controlP5/Textfield.InputFilter.html#DEFAULT where it defines how to use inputFilter...but i can't understand how to use the DEFAULT option .
I just found this that will do the job.. :)