Hello guys!
I'm wondering about the structure of the "object" or "array" to pass to a view variable for being used in a Select form element.
My actual variable looks like.
array (size=4)
0 =>
array (size=2)
'id' => string '60' (length=2)
'name' => string 'ClientOne' (length=9)
1 =>
array (size=2)
'id' => string '61' (length=2)
'name' => string 'ClientTwo' (length=9)
2 =>
array (size=2)
'id' => string '62' (length=2)
'name' => string 'ClientThree' (length=11)
3 =>
array (size=2)
'id' => string '63' (length=2)
'name' => string 'ClientFour' (length=10)
In my volt tempalte I have something like this:
{{ select('client', clients, 'using': ['id', 'name'], 'id' : 'client', 'required' : 'required', 'class' : 'form-control') }}
What is wrong?