TablerBundle
TablerBundle copied to clipboard
[Feature] Image Check Checkbox/Radio Inputs
Please add some FormType and form themes to add the Image Check Checkbox and Radio Inputs.
Form structure should be like the examples from tabler.io https://tabler.io/docs/forms/form-image-check
And I wondered if thosed where ever used outside of the preview. Seems yes 😁
If anyone wants to contribute a PR, please let me know!
Yeah I also thought no one would use it. But I'm helping a colleague with his footpicker an in one form you can pick an restaurant and there will be the logo be displayed.
Would it be possible to add this as an formtype extension because we are using the doctrine entity type which is based on the choice type. And I think all possible choice types should have the possibility to display as image check
You need to attach meta data to each entry for the logo url, so the default doctrine entity type is probably the wrong form type. Afair symfony recommends populating the list of entities yourself in such cases.
Just use a normal ChoiceType and set choices = your array of entities. Then add a form_widget twig block to render the needed html.