Radio Buttons split into two columns

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
kgeorge
Posts: 16
Joined: 2020-02-16 16:14

Radio Buttons split into two columns

Post by kgeorge » 2025-05-19 22:06

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

User avatar
lramirez
Veteran Member
Posts: 85
Joined: 2019-11-01 23:23

Re: Radio Buttons split into two columns

Post by lramirez » 2025-05-22 13:27

like this?... or do you have a special custom example?
Attachments
muestra.png
muestra.png (26.66 KiB) Viewed 4461 times
Luis Ramirez R.

User avatar
lramirez
Veteran Member
Posts: 85
Joined: 2019-11-01 23:23

Re: Radio Buttons split into two columns

Post by lramirez » 2025-05-22 20:38

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
Luis Ramirez R.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1709
Joined: 2018-04-01 10:12

Re: Radio Buttons split into two columns

Post by pbottcher » 2025-05-24 17:22

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.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply