ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

Set a valid number range in a text field

Fritz 08 Jul, 2018
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
healyhatman 08 Jul, 2018
Under advanced->Extra Attributes you could put
min:1
max:4
type:number
healyhatman 08 Jul, 2018
Otherwise you're going to have to add custom javascript validation to it, because min/max isn't something supported out of the box.
GreyHead 08 Jul, 2018
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
Fritz 09 Jul, 2018
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
GreyHead 09 Jul, 2018
Hi Fritz,

What exactly are you trying to do here?

Bob
healyhatman 09 Jul, 2018
Each value needs to be on a new line.
Fritz 10 Jul, 2018
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
healyhatman 10 Jul, 2018
You need to enter on the identifier for the thing you're going to reload
Fritz 10 Jul, 2018
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
healyhatman 10 Jul, 2018
No enter the name you have given the field not the black tag identifier.
Fritz 10 Jul, 2018
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
healyhatman 10 Jul, 2018
What does the code you use in your reload event look like?

And don't use the id use the name. No # symbol either.
Fritz 10 Jul, 2018
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?
healyhatman 10 Jul, 2018
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.
healyhatman 10 Jul, 2018
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.
Fritz 11 Jul, 2018
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.
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com