UnionOfRAD/lithium — Issue #298: form->config templates doesn't stick
Author: tonyeung
Created: 2012-01-26 04:26:35+00:00
State: open

I think I followed the code doc in the Form.php helper file (my implementation is below), but the template I specified isn't being used for some reason. Below the php code is what actually gets rendered, and what I'm expecting to get rendered. In order to work around this, I went ahead and changed the default template in the Form.php file, lines 41 and 58. This is important because I'm using the name for both grouping and validation on the radios and checkboxes

```php

form->create($psr, array('id' => 'PSR')); ?>
form->config(array('templates' => array(
'radio' => '',
'checkbox' => ''
)));?>

form->field(
'radio1a',
array(
'type' => 'radio',
'name' => 'radio1',
'value' => 'radio1a',
'label' => ' Radio 1 A'
)
); ?>
form->submit('Create me'); ?>
form->end(); ?>
```
The above code generates according to the default template

Radio 1 A

Its supposed to generate the below (notice the name is what **I specified**: radio1, not what was passed as the id of the field: radio1a)

Radio 1 A