How do I change checkboxes display? D7.0.2

Hi all,

I created profile fields with multiple select checkboxes. They are displayed like:

I want it displayed like:

How do I do this?

A long list like first image looks like cr*p and there is no option to alter checkboxes display.

Regards,

Harvliet

Quote · 28 Jun 2010

Hello I think crop function should work automatically when count of check boxes > N

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 28 Jun 2010

Hello I think crop function should work automatically when count of check boxes > N

I have a profile field with 32 choices but it doesn't crop. Shows the full list like image 1.

Quote · 28 Jun 2010

work is done in templates/base/scripts/BxBaseFormView.php

genInputCheckboxSet

$sDivider = '<br />';

change to:

$sDivider = '--;

then see it works in changin

then use this with :

$sOptions .= ($sNewInput . $sDivider); &&

$sCode = <<<BLAH
<div $sAttrs>
$sOptions
</div>
BLAH;

to format a new 3row table from it.

have fun...

I have video tutorials to help you mrpowless.com
Quote · 19 Nov 2010

Hello
really important to me
I did not find the line - genInputCheckboxSet
you know how to do with dolphins 7.0.4
I wish I had - 5 horizontal
Cordially
Quote · 19 Dec 2010

please - someone there a solution

Quote · 20 Dec 2010

Will this also work with D7.0.9? 

I only got it horizontal but no second row. Maybe i'm doing something wrong.

work is done in templates/base/scripts/BxBaseFormView.php

genInputCheckboxSet

$sDivider = '<br />';

change to:

$sDivider = '--';  <-- works

then see it works in changin

then use this with :

$sOptions .= ($sNewInput . $sDivider); &&  <-- gives an error

$sCode = <<<BLAH
<div $sAttrs>
$sOptions
</div>
BLAH;

to format a new 3row table from it.

have fun...

 

Quote · 25 Mar 2012

How can I get this to work in Dolphin 7.1.4? Please see initial post.

Quote · 23 Jan 2014

templates/base/scripts/BxBaseFormView.php - around line 938, you will find:

 

 if (isset($aInput['values']) and is_array($aInput['values'])) {
            if (count($aInput['values']) > 3 && $sDivider == ' ')
                $sDivider = '<br />';
            // generate complex input using simple standard inputs
            foreach ($aInput['values'] as $sValue => $sLabel) {
                // create new simple input
                $aNewInput = array(
                    'type' => 'checkbox',
                    'name' => $aInput['name'] . '[]',
                    'value' => $sValue,
                    'checked' => in_array($sValue, $aCurValues),
                    'label' => $sLabel,
                );

                $sNewInput  = $this->genInput($aNewInput);

                // attach new input to complex
                $sOptions .= ($sNewInput . $sDivider);
            }
        }

 

the section in blue determines how many checkboxes will be displayed in a row but I think after this number it will only show a single column. The changesets a long time ago was supposed to wrap or something, so not exactly sure what it will do for you. I only needed 4 in a row so never tried more than that.

caredesign.net
Quote · 24 Jan 2014

 

templates/base/scripts/BxBaseFormView.php - around line 938, you will find:

 

 if (isset($aInput['values']) and is_array($aInput['values'])) {
            if (count($aInput['values']) > 3 && $sDivider == ' ')
                $sDivider = '<br />';
            // generate complex input using simple standard inputs
            foreach ($aInput['values'] as $sValue => $sLabel) {
                // create new simple input
                $aNewInput = array(
                    'type' => 'checkbox',
                    'name' => $aInput['name'] . '[]',
                    'value' => $sValue,
                    'checked' => in_array($sValue, $aCurValues),
                    'label' => $sLabel,
                );

                $sNewInput  = $this->genInput($aNewInput);

                // attach new input to complex
                $sOptions .= ($sNewInput . $sDivider);
            }
        }

 

the section in blue determines how many checkboxes will be displayed in a row but I think after this number it will only show a single column. The changesets a long time ago was supposed to wrap or something, so not exactly sure what it will do for you. I only needed 4 in a row so never tried more than that.

I see the code but I guess it does not wrap because it is still a single column. I am not using the default template but I tested it with the default template too. It does not show 3 rows. It sucks. Thanks for the reply.

Quote · 24 Jan 2014

Check the width of your columns and play around with the CSS.

It might be that your columns are too wide or maybe use float:left in your css, or a combination of, or...

Dedicated servers for as little as $32 (28 euro) - See http://denre.com for more information
Quote · 24 Jan 2014

And be sure to clear the caches.

Geeks, making the world a better place
Quote · 24 Jan 2014

Hi guys, did this ever get resolved?

I have exactly the same problem and can't find the solution in these posts.

I have found in BxBaseFormView.php:

       if (isset($aInput['values']) and is_array($aInput['values'])) {
            if (count($aInput['values']) > 3 && $sDivider == ' ')
                $sDivider = '<br />';

But I don't know what to change to create more than one column.

The link that Mauricecano posted up for his Mod is now broken :( http://www.boonex.com/m/Columns_for_your_Multiple_Select_Options

Any help will be greatly appreciated :)

 

J

Quote · 24 Jun 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.