I'm attempting to populate a radio field's value from the controller but it doesn't seem to work as expected.
In my controller action:
$search_in = $this->request->get('search_in','string','all');
\Phalcon\Tag::setDefault("search_in", $search_in);
In my volt view I have:
{{ radio_field('search_in_label', 'name':'search_in', 'value':'label') }}
{{ radio_field('search_in_address', 'name':'search_in', 'value':'address') }}
{{ radio_field('search_in_all', 'name':'search_in', 'value':'all') }}
I have to set the id, name and value separately to produce the HTML needed to 'link' the radio fields. Unfortunately this seems to cause the template rendering to get confused; it seems the rendering of a 'checked' value is based on the 'id', rather than the 'name' of the form field.
The documentation does not provide any examples for radio_field() so I'm not quite sure if I'm using it correctly.
I'm using Phalcon v1.2.5.
Any thoughts?