formio / formio.js

JavaScript powered Forms with JSON Form Builder
https://formio.github.io/formio.js
MIT License
1.89k stars 1.06k forks source link

Render a radio as button group #5395

Closed AnthonyPhan closed 1 month ago

AnthonyPhan commented 1 year ago

Hi 👋

Is it possible in the form builder to configure a radio component to render as a group of radio button as show below:

image

I've tried using some boot strap classes like btn-group btn-group-toggle however this did not seem to work

travist commented 1 month ago

In order to do this, you will need to override the "radio" template to provide the template (dom) for the radio buttons. Here are some docs for how to do this.

https://help.form.io/developers/form-development/form-templates#overriding-templates