Buy Now
Sign in

Set a valid number range in a text field

Fritz , July 08 at 14:21
Fritz
I have to set the valid range (from 1 to 4) in the text field. How should I do? I can't find indications in the manual or discussions about it.
number-range-validation.jpg
FrontpageServer
High-Speed Fiber Optic Web Hosting
H
healyhatman
Under advanced->Extra Attributes you could put
min:1​
​max:4​
​type:number
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
H
healyhatman
Otherwise you're going to have to add custom javascript validation to it, because min/max isn't something supported out of the box.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
GreyHead
Hi Fritz,
Just a thought but if the only valid entries are 1, 2, 3, 4 then you could use a Radio button Group or maybe a drop-down.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
Fritz
Thanks for the indication. But I don't understand how to set the reload event of this field (nr_der_gste1) for values other than 1,2,3,4. What am I doing wrong?number-range-validation2.jpg
Attachments
number-range-validation2.jpg
number-range-validation2.jpg
(30.71 KiB)
73 Downloads/Views
FrontpageServer
High-Speed Fiber Optic Web Hosting
GreyHead
Hi Fritz,
What exactly are you trying to do here?
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
H
healyhatman
Each value needs to be on a new line.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
Fritz
By testing with the preview button (top right in the design form interface) by entering a not equal number (e.g. 6), the reload action no work (the preview window go to blank).
number-range-validation3.jpg
number-range-validation4.jpg
Attachments
number-range-validation3.jpg
number-range-validation3.jpg
(40.71 KiB)
57 Downloads/Views
number-range-validation4.jpg
number-range-validation4.jpg
(31.44 KiB)
57 Downloads/Views
FrontpageServer
High-Speed Fiber Optic Web Hosting
H
healyhatman
You need to enter on the identifier for the thing you're going to reload
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
Fritz
Thank You for your help, healyhatman!
Even indicating the field_text14 (as also in the advanced tab), it does not work and doesn't remain on this field if I insert a wrong value. Exactly like when I enter a correct value, the preview proceeds by giving a blank page (since the module is not finished yet and this is currently the last field).
number-range-validation5.jpg
number-range-validation6.jpg
Attachments
number-range-validation5.jpg
number-range-validation5.jpg
(39.28 KiB)
53 Downloads/Views
number-range-validation6.jpg
number-range-validation6.jpg
(80.49 KiB)
53 Downloads/Views
FrontpageServer
High-Speed Fiber Optic Web Hosting
H
healyhatman
No enter the name you have given the field not the black tag identifier.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
Fritz
Even if I enter an correct #ID value, as indicated, the field relay doesn't work. By entering an incorrect value with two or more digits (which it should not accept) only the field_text14 disappears; while if I insert a wrong value with one digits (such as 9), start two hourglasses gifs and then appear a blank page.
number-range-validation7.jpg
number-range-validation8.jpg
number-range-validation9.jpg
Attachments
number-range-validation7.jpg
number-range-validation7.jpg
(86.75 KiB)
49 Downloads/Views
number-range-validation8.jpg
number-range-validation8.jpg
(54.61 KiB)
49 Downloads/Views
number-range-validation9.jpg
number-range-validation9.jpg
(26.81 KiB)
51 Downloads/Views
FrontpageServer
High-Speed Fiber Optic Web Hosting
H
healyhatman
What does the code you use in your reload event look like?
And don't use the id use the name. No # symbol either.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
Fritz
What does the code you use in your reload event look like?
If you are referring to the value entered in the advanced->reload event field (I don't see any other point for filling this value), the name is: field_text14 (see previous screenshot 3).
And don't use the id use the name. No # symbol either.
As indicated by the tooltip (screenshot 5), I tried to reload the input ID using the suggested syntax (see the screenshot 7). I seem to have scrupulously followed the instructions.​
​​
​In your opinion, is there a clear and understandable guide to set up a trivial feature like this?
FrontpageServer
High-Speed Fiber Optic Web Hosting
H
healyhatman
If you are referring to the value entered in the advanced->reload event field (I don't see any other point for filling this value), the name is: field_text14 (see previous screenshot 3).
That right there is your problem then. It's asking for a reload EVENT, as in an event you've made in the setup tab.
Yes there is a clear and understandable setup guide to set up a trivial feature such as that - one of the demo forms is a dynamic load.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
Fritz
Are you referring to this?
...and if this is the right article, to create an event is it meant to use the "event loader" particle?number-range-validation10.jpg
Attachments
number-range-validation10.jpg
number-range-validation10.jpg
(112.57 KiB)
43 Downloads/Views
FrontpageServer
High-Speed Fiber Optic Web Hosting
H
healyhatman
No. Load is an event, submit is another event. The event load loads an event, and is used when you need to for whatever reason run an event during another event.
You will need to create a new event on the setup tab (down the very bottom) and put your code / logic in there.
In the main chronoforms page where all your forms are listed there is a demo button. Click that and one of the displayed options is a dynamic load option. You can also look in the instruction manual.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
Fritz
I give up.
For such a simple function (so I thought) that is characteristic of a numeric field, I hoped to set it as it already stands for minimum and maximum lenght in the design interface. Maybe I have to work with Chronoforms daily to understand the logic. I am a limited user. I just can't understand the (programming) logic why I have to do so many operations to set a simple numerical range.
For the times when a client asks me to insert a form, I can't waste so much time and at the end not reach a solution.
I have made the module quite normal and standard, as for others (which I have already created with chronoform 6), without activating these numerical controls.​
​​
​I'm so sorry. Obviously, my English skills are not enough to understand the instructions and the technical skills are too hight compared to my general webmaster knowledge.​
​​
​I thank everyone and especially healyhatman for the help.
FrontpageServer
High-Speed Fiber Optic Web Hosting