You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #10513 [Bridge][Propel1][Form] Model choice accept custom unique column (cedriclombardot)
This PR was merged into the 2.5-dev branch.
Discussion
----------
[Bridge][Propel1][Form] Model choice accept custom unique column
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| License | MIT
This PR permit to do :
```` php
<?php
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('my_field', 'model', array(
'class' => 'MyClassWithSlug',
'index_property' => 'slug'
));
}
````
With this option you can hide internal ids to expose an unique column eg slug and render
```` html
<select name="my_field">
<option value="{THE_SLUG}">{THE_VALUE}</option>
</select>
````
Commits
-------
81e94d0 Model choice accept custom unique column
0 commit comments