We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

hOW TO SET VALUES TO TEXT FIELDS IN VOLT

here i want to set the values of each element in pid[] array.....how to that? below is my code

{% for element in role %} {{ element }} {{ hiddenform.render('pid', ['class': 'form-control']) }} // I want to set value of element to pid

{% endfor %}

please somebody help???

edited Oct '16

Not sure what exactly you want to do, but you can use set clause to assign something to a variable in volt.

For example: {% set my_var = 1 %}.