Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Range step in Volt

Hi guys!

How build step in for range in Volt ?

My solutions (step by 5000):

{% for summ in 5000..100000 if summ % 5000 == 0 %}
    <option value="{{summ}}">{{ summ|money }}</option>
{% endfor %}

returned 5000, 10000, 15000 and etc...

But it is not beautiful. Or not?

Thanks, and sorry for my dialect :)



19.6k
Accepted
answer

Hi Alexashka,

my teacher said: "if it works is good and good is very good".

maybe a little bit cleaner to render a form: https://docs.phalconphp.com/en/latest/reference/forms.html

Hope it helps you :-)

Rgds

Stefan