How to "restrict" the type of input to text fields, i.e. check that the input is valid? #630
-
|
Hi again, for an input like the following: 'Custom Values, 'V = ? {123} Is there a way we can limit the type of values we input? such as check if the value falls within a range? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
|
Hi, @fliptoback ! It depends on what you are doing with this information... I'm not sure there is a builtin function for that. But you can use a simple |
Beta Was this translation helpful? Give feedback.
-
|
#hide
v=0
#while or(v<100;v>200)
#input
#pre
v=?{150}'.
#post
v'.
在 2025-09-05 08:48:24,fliptoback ***@***.***> 写道:
Thanks Javila. I am sorry I didn't phrase my questions correctly. What I meant to ask is this...
I have a text field whereby I can insert some numbers into this variable "V". Now say the valid "V" values I can accept is range between 100 and 200. If I enter say 250, how do i "ignore" it in the text field - similar to how the excel validation would work in the cell?
So essentially i want to force the input of valid numbers into the text field.
Is this achievable?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
#hide
v=0
#while or(v<100;v>200)
#input
#pre
'v should be in the range of (100,200):
v=?{150}'.
#hide
#loop
#post
v'.
在 2025-09-05 09:38:35,fliptoback ***@***.***> 写道:
Thanks idealkindom. I try out the code - say I input 250 (which is outside of the valid range), then i press F5, it run the rest of the script and populate the number 150.
How do i make the original input to be within 100 and 200?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Hi! You can do that entirely in input phase by JavaScript. Try this example: |
Beta Was this translation helpful? Give feedback.
Hi!
You can do that entirely in input phase by JavaScript. Try this example: