4

I read here that there's a new range form field type since J! 3.2 that will provide a horizontal scroll bar to specify a value in a range.

But when I opened the description page, there is no instruction how to use it.

Anybody knows how to use it?

4

When ever in doubt about Joomla's form fields, have a look at the following directory, where you will find each one.

libraries/joomla/form/fields

To get a range form field, you can use the following:

<field 
    name="range" 
    type="range" 
    default="1" 
    label="Choose a number" 
    description="" 
    min="1" 
    max="10" 
    step="1" />

The above will give you a slider ranging from 1 to 10.

Unfortunately this doesn't show you the number you have chosen on the slider, so you will be to use the onchange="" attribute or maybe override the form field.

  • Ah too bad, I was using bootstrap slider before, and it looks like I have to stick with it for a while until "show the chosen number" fixed. Anyway thanks for the help. – webchun Jul 9 '15 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.