Page 1 of 1
Radio Buttons split into two columns
Posted: 2025-05-19 22:06
by kgeorge
Hi All,
Hopefully this is an easy request. Is there a way to split a list of radio buttons into two columns?
If you could show me the code to do this I would be very grateful!
Thanks,
Kent
Re: Radio Buttons split into two columns
Posted: 2025-05-22 13:27
by lramirez
like this?... or do you have a special custom example?
Re: Radio Buttons split into two columns
Posted: 2025-05-22 20:38
by lramirez
Or if you're talking about the internal fields with selector buttons and how to sort them... this might help you...
https://forums.appgini.com/phpbb/viewto ... umn+layout
Re: Radio Buttons split into two columns
Posted: 2025-05-24 17:22
by pbottcher
Hi,
you could also try to add some code like:
Code: Select all
case 'detailview':
$header='<%%HEADER%%><style>
.radio-grid {
display: grid;
grid-template-columns: repeat(2, 1fr); # change this value for the amount of columns
gap: 10px;
}
input[type="radio"], input[type="checkbox"] {
margin-right: 3px;
}
</style>
<script>
$j(function() {
const $parent=$j(\'[name="checkboxes"]\').parent();
$parent.addClass(\'radio-grid\');
const $set = $parent.children();
const $elements=3;
for(var i=0, len = $set.length; i < len; i+=$elements) {
$set.slice(i, i+$elements).wrapAll(\'<div/>\');
}
});
</script>
';
to the hooks/TABLENAME.php -> _header function.