function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Questions regarding visualforce

Questions regarding visualforce. I post a thread on the discussion board but do not get good feedback.

I have a multipicklist custom field which has ten values and  I want to display this custom field as checkboxes on the VF page. Now I use apex:selectCheckboxes tag, but the result is all the ten checkboxes are in one line(I don’t find any attribute on this tag to limit the numbers per line). Is there any way to display only three checkboxes in each line?


box 1 box 2 box 3 box 4 … box 10

I want:

box 1 box 2 box 3

box 4 box 5 box 6


box 10


Another question is that currently I am using tabpanel and each panel is a Visualforce page. So when I click the panel, I want to go to a different vf page.  I try to add javascript code 'windon.location = PAGEURL' in onclick event, but it does not seem to work. Can you give me some suggestions? Thanks!

Richie DRichie D



You might be able to wrap a small div around the checkboxes tag and this would cause it to wrap. Or possibly try setting the style of the checkboxes tag to width:60px or whatever.



Not sure about your second problem, perhaps a 'return false;' statement after your window.location may do it.


Good luck.



<apex:pageBlockSection columns="1" title="test" id="BlkSec"> <apex:selectCheckboxes id="interestsCheckboxes" value="{!selectedInterests}" layout="pageDirection" > <apex:selectOptions value="{!interests}"/> </apex:selectCheckboxes> </apex:pageBlockSection>


Above is my vf code, using selectCheckboxes tag will render each checkbox in a column then put them together in one row or the other way around. So could you please provide more information how to write the css? Thanks!

check out this page:


You may able to use the guidance there.

Any Specific ideas how to do that? like examples, thanks!

I put a javascript based solution for this in the thread with title "Putting selectCheckBoxes in columns"