Select value for textbox

Hi guys,

I was playing around with Volt and i ran across the problem that i can't seem to set default value for select boxes. The following code is what i have now, but there's no selected value.

The value of status is in customer.status

{{ select_static('status', ['0' : 'Niet-actief', '1' : 'Actief'], 'class' : 'form-control') }}

Thanks in advance!


For example, $status contains the data necessary to fill the SELECT tag using Phalcon\Tag::select and into controller that seems like this:

// Current status
Tag::displayTo('status', $status);
// List of all statuses
$this->view->setVar("statuses", Posts::getStatuses());

And this how we can create and fill SELECT in Volt: ```volt {{ select("status", statuses, "using": ["id", "name"]) }} ```


Hey Maxim,

Thanks for helping out, it works now! ;-)