Thursday, November 25, 2010

RE: Manually make multiple checkbox?

Sorry man, I do not follow.

Say I have 15 checkboxes spit out by using multiple I need to wrap the first
3 checkboxes inside a class then the next 3 and so on.

15 / 3 = 5 sets of 3
All are not wrapped in a single class.
Sure I have my width set at 33% so each chechbox class is 33% x 3 99% (the
full width) so after the 3rd its too wide so it drops down starting new
row...but its still in the same div. I need to now end that div start a new
div for the next 3.

Cake spits out fieldset checkbox x 15 (sure css can play around to get 3
across but all are still inside 1 div) cake is not going to add end /div
tags after every 3 and start a new div for every 4th count like I need

That's why I need to loop in foreach to make the checkbox manually so after
3 I end the div completely closing it I can then put a div class "spacer" to
separate the row from what will follow after the spacer / image / lines
whatever then start the next row of checkboxes continuing on 4 5 and 6 end
that div. insert spacer and start next row.

Cake is not going to do that. Css is not going to add close a div after each
3.....your css code would close after the fieldset. Not after every 3rd.

So how do you know when to add / close the div? Well that's why
foreach.........each row is all from the same dataset 1 - 15 im not doing
rows of different Models

<Div>chechbox, chechbox,chechbox</div>
<div whatever I want</div>
<Div>chechbox, chechbox,chechbox</div>
<div whatever I want</div>
<Div>chechbox, chechbox, chechbox</div>
<div whatever I want</div>
<Div>chechbox, chechbox, chechbox</div>
<div whatever I want</div>
<Div>chechbox, chechbox, chechbox</div>

Thanks,

Dave

-----Original Message-----
From: cricket [mailto:zijn.digital@gmail.com]
Sent: November-25-10 2:18 PM
To: cake-php@googlegroups.com
Subject: Re: Manually make multiple checkbox?

On Thu, Nov 25, 2010 at 9:26 AM, Dave Maharaj <me@davemaharaj.com> wrote:
> Right but all that does is give me 1 cleaned row with 3 going across with
a
> clear after the fieldset. I need each 3 to be 1 div
> <div class="my_class"> checkbox 1, 2, and 3 </div>
> <div class="my_class"> checkbox 4, 5, and 6 </div>
> <div class="my_class"> checkbox 7, 8, and 9 </div>
> <div class="my_class"> checkbox 10, empty, empty </div>

That's what the width is for. Set that to aprox. 1/3 the width. Or, if
the container is too wide, wrap everything in another div and set a
total width on that, then apply a width to .checkbox 1/3 of that.

> The checkbox count is not static so that's why foreach was the idea I came
> up with.

So, a good reason to just let them all float and allow the assigned
width take care of making your rows.

> I have 3 floating across now as you have yours set up but I want to
separate
> / divide the rows with some graphics / lines so its not just a chunk of
text
> and boxes, that's where the 3 per div / separate next 3 / separate and so
on
> comes in.

Well, that's certainly more complicated.

Check out the new CakePHP Questions site http://cakeqs.org and help others
with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: