RE: Manually make multiple checkbox?

2010-11-25 Thread Dave Maharaj
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

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

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.

Thanks

Dave

-Original Message-
From: cricket [mailto:zijn.digi...@gmail.com] 
Sent: November-24-10 11:54 PM
To: cake-php@googlegroups.com
Subject: Re: Manually make multiple checkbox?

This works for me:

echo $form-select('Options', $optionss, null, array('multiple' =
'checkbox'));

css:
div.checkbox { margin-bottom:1.5em; float: left; margin-right: 1em;
width:10em;}
fieldset:after
{content:\0020;display:block;height:0;clear:both;visibility:hidden;overflo
w:hidden;}

The 2nd rule adds some hidden content after the fieldset that is set
to clear the floating divs (so the following content doesn't run into
it).

On Wed, Nov 24, 2010 at 9:44 PM, Dave Maharaj m...@davemaharaj.com wrote:
 I have my data array from find-list and made a multiple checkbox set.

 Problem is I want more than 1 per row so im trying to do a foreach and
 manually create the checkbox wrapped inside my div so I can get 3 across
per
 row, end row start new.

 I have the layout fine with the css ending after 3 /div start new row
 div
       div class=chechrowcheckbox/div
       div class=chechrowcheckbox/div
       div class=chechrowcheckbox/div
 /div

 div
       div class=chechrowcheckbox/div
       div class=chechrowcheckbox/div
       div class=chechrowcheckbox/div
 /div..so on you get the idea


 Problem is it wont work.

 Standard data set array(
 [0] = Something
 [1] = Something Else)

 So I loop thru each

 ?php foreach ($option as $key = $value):?

 ?php echo $this-Form-input( 'Option', array( 'type' = 'checkbox',
 'label' = $value, 'value' = $key, 'div' = false, 'legend' = false)):?

 I get input hidden with each one.

 input type=hidden name=data[Option][ Option][] id= OptionOption_
 value=0 /input type=checkbox name=data[Option][ Option][]
 label=Arts and Culture value= id=JobDutyJobDuty//div

 If I debug $key I get the value yet it never shows up in the code value =
0?
 And why all the hidden elements?

 I added what appears on the regular input multiple checkbox section and
 added that before my foreach = input type=hidden
 name=data[Option][Option] value= id=OptionOption /

 Anyone see where I have gone wrong?

 Thanks,

 Dave





 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+unsubscr...@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+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Manually make multiple checkbox?

2010-11-25 Thread cricket
On Thu, Nov 25, 2010 at 9:26 AM, Dave Maharaj m...@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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


RE: Manually make multiple checkbox?

2010-11-25 Thread Dave Maharaj
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

Divchechbox, chechbox,chechbox/div
div whatever I want/div
Divchechbox, chechbox,chechbox/div
div whatever I want/div
Divchechbox, chechbox, chechbox/div
div whatever I want/div
Divchechbox, chechbox, chechbox/div
div whatever I want/div
Divchechbox, chechbox, chechbox/div

Thanks,

Dave



-Original Message-
From: cricket [mailto:zijn.digi...@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 m...@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+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Manually make multiple checkbox?

2010-11-25 Thread cricket
On Thu, Nov 25, 2010 at 2:06 PM, Dave Maharaj m...@davemaharaj.com wrote:
 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.

Yeah, I realise that. If you want to separate each row into its own
div you're going to have to find some other solution. Frankly, though,
I think you should re-think whether you really need a separate
wrapping div for each row.

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Manually make multiple checkbox?

2010-11-24 Thread Dave Maharaj
I have my data array from find-list and made a multiple checkbox set.

Problem is I want more than 1 per row so im trying to do a foreach and
manually create the checkbox wrapped inside my div so I can get 3 across per
row, end row start new.

I have the layout fine with the css ending after 3 /div start new row 
div 
   div class=chechrowcheckbox/div
   div class=chechrowcheckbox/div
   div class=chechrowcheckbox/div
/div

div 
   div class=chechrowcheckbox/div
   div class=chechrowcheckbox/div
   div class=chechrowcheckbox/div
/div..so on you get the idea


Problem is it wont work.

Standard data set array(
[0] = Something
[1] = Something Else)

So I loop thru each 

?php foreach ($option as $key = $value):?

?php echo $this-Form-input( 'Option', array( 'type' = 'checkbox',
'label' = $value, 'value' = $key, 'div' = false, 'legend' = false)):?

I get input hidden with each one.

input type=hidden name=data[Option][ Option][] id= OptionOption_
value=0 /input type=checkbox name=data[Option][ Option][]
label=Arts and Culture value= id=JobDutyJobDuty//div

If I debug $key I get the value yet it never shows up in the code value = 0?
And why all the hidden elements?

I added what appears on the regular input multiple checkbox section and
added that before my foreach = input type=hidden
name=data[Option][Option] value= id=OptionOption /

Anyone see where I have gone wrong?

Thanks,

Dave
 


   

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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Manually make multiple checkbox?

2010-11-24 Thread cricket
This works for me:

echo $form-select('Options', $optionss, null, array('multiple' = 'checkbox'));

css:
div.checkbox { margin-bottom:1.5em; float: left; margin-right: 1em; width:10em;}
fieldset:after 
{content:\0020;display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}

The 2nd rule adds some hidden content after the fieldset that is set
to clear the floating divs (so the following content doesn't run into
it).

On Wed, Nov 24, 2010 at 9:44 PM, Dave Maharaj m...@davemaharaj.com wrote:
 I have my data array from find-list and made a multiple checkbox set.

 Problem is I want more than 1 per row so im trying to do a foreach and
 manually create the checkbox wrapped inside my div so I can get 3 across per
 row, end row start new.

 I have the layout fine with the css ending after 3 /div start new row
 div
       div class=chechrowcheckbox/div
       div class=chechrowcheckbox/div
       div class=chechrowcheckbox/div
 /div

 div
       div class=chechrowcheckbox/div
       div class=chechrowcheckbox/div
       div class=chechrowcheckbox/div
 /div..so on you get the idea


 Problem is it wont work.

 Standard data set array(
 [0] = Something
 [1] = Something Else)

 So I loop thru each

 ?php foreach ($option as $key = $value):?

 ?php echo $this-Form-input( 'Option', array( 'type' = 'checkbox',
 'label' = $value, 'value' = $key, 'div' = false, 'legend' = false)):?

 I get input hidden with each one.

 input type=hidden name=data[Option][ Option][] id= OptionOption_
 value=0 /input type=checkbox name=data[Option][ Option][]
 label=Arts and Culture value= id=JobDutyJobDuty//div

 If I debug $key I get the value yet it never shows up in the code value = 0?
 And why all the hidden elements?

 I added what appears on the regular input multiple checkbox section and
 added that before my foreach = input type=hidden
 name=data[Option][Option] value= id=OptionOption /

 Anyone see where I have gone wrong?

 Thanks,

 Dave





 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+unsubscr...@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+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en