# |
Aug 7th 2008, 16:09 |
TommyO |
the API might help |
# |
Aug 7th 2008, 16:09 |
beatzombies |
ill paste what im doing |
# |
Aug 7th 2008, 16:09 |
pgcd_away |
(not to copy and paste, of course)? |
# |
Aug 7th 2008, 16:08 |
pgcd_away |
beatzombies: wait, i must have got it wrong. did you try something like a foreach($item['Item'] as) echo $html->checkbox('ContributorsItem.done')? |
# |
Aug 7th 2008, 16:08 |
beatzombies |
pgcd_away: the following does NOT work: $form->checkbox('contributed', array("value" => 1, "checked"=> $item['ContributorsItem']['contributed'])); |
# |
Aug 7th 2008, 16:06 |
beatzombies |
pgcd_away: yeah, i think it does, got a fatal error. do you know what the array keys should be? |
# |
Aug 7th 2008, 16:04 |
pgcd_away |
possibly the second parameter needs to be an array |
# |
Aug 7th 2008, 16:04 |
beatzombies |
pgcd_away: hmm ok, lemme give that shot |
# |
Aug 7th 2008, 16:04 |
pgcd_away |
beatzombies: i think it should be something like: $form->checkbox('contributed', $item['ContributorsItem']['contributed']) |
# |
Aug 7th 2008, 16:03 |
beatzombies |
pgcd_away: i just tried that and still no luck |
# |
Aug 7th 2008, 16:02 |
beatzombies |
pgcd_away: so i should have something like $form->checkbox($item['ContributorsItem']['contributed']); ? |
# |
Aug 7th 2008, 16:02 |
pgcd_away |
which is not a constructor, right =) |
# |
Aug 7th 2008, 16:02 |
pgcd_away |
$html->checkbox |
# |
Aug 7th 2008, 16:01 |
beatzombies |
pgcd_away: the constructor of what? |
# |
Aug 7th 2008, 16:01 |
pgcd_away |
beatzombies: i haven't been using checkboxes so i'm not sure, but the only way i could have cake populate a list with the values I need was to have a variable hold the values, and pass the variable to the constructor |
# |
Aug 7th 2008, 16:00 |
beatzombies |
pgcd_away: does it need to be available in some other fashion/ |
# |
Aug 7th 2008, 16:00 |
beatzombies |
pgcd_away: executing echo("Checked: ".$item['ContributorsItem']['contributed']); outputs the correct value |
# |
Aug 7th 2008, 15:58 |
mitnavn |
TommyO: I can report that routing users/login is a bad idea :P I hadn't thought about it, but it makes the action for the login form non-functional. |
# |
Aug 7th 2008, 15:58 |
pgcd_away |
beatzombies: is ContributorsItem.contributed actually available in the form? |
# |
Aug 7th 2008, 15:58 |
_psychic_ |
wonder if it has to do with the nested nature of the data you're handing it |
# |
Aug 7th 2008, 15:57 |
beatzombies |
do i need to supply additional paramaters to actually get the checking to work? |
# |
Aug 7th 2008, 15:55 |
beatzombies |
I am using <?php echo $form->checkbox("ContributorsItem.contributed"); ?> |
# |
Aug 7th 2008, 15:55 |
_psychic_ |
beatzombies: what are you using to generate the checkboxes? |
# |
Aug 7th 2008, 15:55 |
beatzombies |
i want some checkboxed to be checked based on the value of ContributorsItem.contributed |
# |
Aug 7th 2008, 15:55 |
beatzombies |
hey, i'm back and still having some problem with checkboxes. here is the data I am retrieving using the controller: http://bin.cakephp.org/view/1445958937 |
# |
Aug 7th 2008, 15:38 |
seghezzi |
teknoid: that is correct, my models are not related. |
# |
Aug 7th 2008, 15:38 |
pgcd_away |
is anybody using lightbox helper? |
# |
Aug 7th 2008, 15:37 |
teknoid |
seghezzi: ... agian if your models are related you shouldn't have $uses array |
# |
Aug 7th 2008, 15:36 |
seghezzi |
roger that |
# |
Aug 7th 2008, 15:35 |
cudell |
making changes to /views/layouts/default.ctp show up fine, but not in other views |
# |
Aug 7th 2008, 15:35 |
ADmad |
seghezzi: both |
# |
Aug 7th 2008, 15:34 |
seghezzi |
if i have a recipeController, and i want to ad a User model, in the $uses array i must list both models, or i could just list the user model? |
# |
Aug 7th 2008, 15:34 |
teknoid |
seghezzi: you sure your models are not related? |
# |
Aug 7th 2008, 15:33 |
seghezzi |
var $uses = array('Recipe', 'User'); <----- roger |
# |
Aug 7th 2008, 15:33 |
ADmad |
seghezzi: add the models you need to the $uses array |
# |
Aug 7th 2008, 15:31 |
seghezzi |
hi, what is the correct way to tell a controller it uses a second model??? |
# |
Aug 7th 2008, 15:27 |
ADmad |
Wisp: http://api.cakephp.org/class_view.html#3826c0ef9ee1fdc08bc2f4ea1f6a2071 |
# |
Aug 7th 2008, 15:22 |
teknoid |
Wisp: that's not a global variable |
# |
Aug 7th 2008, 15:22 |
_psychic_ |
define it in AppController then. |
# |
Aug 7th 2008, 15:22 |
TommyO |
uughhh I'd rather my neighbor tried to learn to play the bagpipes than this freakin' 'house' crap |
# |
Aug 7th 2008, 15:22 |
_psychic_ |
? |