You need to sign in to do that
Don't have an account?
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?
Now:
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!
Hi,
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.
R.
<apex:pageBlockSection columns="1" title="test" id="BlkSec"> <apex:selectCheckboxes id="interestsCheckboxes" value="{!selectedInterests}" layout="pageDirection" > <apex:selectOptions value="{!interests}"/> </apex:selectCheckboxes> </apex:pageBlockSection>
check out this page:
http://css.maxdesign.com.au/floatutorial/
You may able to use the guidance there.
I put a javascript based solution for this in the thread with title "Putting selectCheckBoxes in columns"