I'm trying to convert the following HTML code to Volt:
<select name="db_table">
<optgroup label="Exhibitions">
// data...
</optgroup>
<optgroup label="Magazines">
// more data...
</optgroup>
</select>
But I'm getting a multitide of errors, and I believe it's because I'm structuring my Volt syntax incorrectly.
This is what I have:
{{ select('db_table', ['Exhibitions': [data_one, 'using': ['db_table', 'name']], 'Magazines': [data_two, 'using': ['db_table', 'name']]], 'class': 'form-control') }}
And I'm getting the error:
Catchable fatal error: Object of class Phalcon\Mvc\Model\Resultset\Simple could not be converted to string
The PHP code that is being generated is:
<?= $this->tag->select(['db_table', ['Exhibitions' => [$databases, 'using' => ['db_table', 'event_name']], 'Magazines' => [$databasesR, 'using' => ['form_id', 'form_name']]], 'class' => 'form-control']) ?>