# |
Aug 7th 2008, 16:52 |
max2k2 |
but the applet gives me the chance to send some cookie data |
# |
Aug 7th 2008, 16:51 |
pgcd_away |
tonkatruck: i don't think so, as you will get a message from cake when you don't have a view |
# |
Aug 7th 2008, 16:51 |
beatzombies |
pgcd_away: when i call debug it prints out line numbers in files |
# |
Aug 7th 2008, 16:50 |
TonkaTruck |
pgcd_away: if debug() is called from the controller do you still need a view for that action? |
# |
Aug 7th 2008, 16:50 |
max2k2 |
I have a little question for the gurues :) |
# |
Aug 7th 2008, 16:50 |
pgcd_away |
beatzombies: as for the values, i can't really figure out - i don't know enough of the code |
# |
Aug 7th 2008, 16:50 |
max2k2 |
hello bakers |
# |
Aug 7th 2008, 16:48 |
pgcd_away |
debug() is like print_var or var_dump, only nicer |
# |
Aug 7th 2008, 16:48 |
beatzombies |
pgcd_away: what does debug() do? |
# |
Aug 7th 2008, 16:48 |
beatzombies |
pgcd_away: do you know what determines the values of the checkbox and corresponding hidden field |
# |
Aug 7th 2008, 16:48 |
pgcd_away |
so, well, if i were you i'd just plunk a debug() there and try to see what's going on |
# |
Aug 7th 2008, 16:47 |
pgcd_away |
that code is from formhelper, circa line 820 |
# |
Aug 7th 2008, 16:46 |
pgcd_away |
no, wait |
# |
Aug 7th 2008, 16:46 |
beatzombies |
hmm that is strange |
# |
Aug 7th 2008, 16:46 |
pgcd_away |
} |
# |
Aug 7th 2008, 16:46 |
pgcd_away |
$options['value'] = $value; |
# |
Aug 7th 2008, 16:46 |
pgcd_away |
} elseif (!empty($value)) { |
# |
Aug 7th 2008, 16:46 |
pgcd_away |
$options['checked'] = 'checked'; |
# |
Aug 7th 2008, 16:46 |
pgcd_away |
if (isset($options['value']) andand $value == $options['value']) { |
# |
Aug 7th 2008, 16:46 |
pgcd_away |
the code for checkbox() will set it as checked only if they are the same |
# |
Aug 7th 2008, 16:45 |
pgcd_away |
i notice the values are 0 and 1 |
# |
Aug 7th 2008, 16:45 |
beatzombies |
ooops |
# |
Aug 7th 2008, 16:45 |
beatzombies |
tecknoid: http://bin.cakephp.org/view/1570066558 |
# |
Aug 7th 2008, 16:44 |
beatzombies |
pgcd_away: yes i did |
# |
Aug 7th 2008, 16:44 |
beatzombies |
pgcd_away: http://bin.cakephp.org/view/1570066558 |
# |
Aug 7th 2008, 16:44 |
pgcd_away |
beatzombies: you did try checkbox without $options, did you? |
# |
Aug 7th 2008, 16:43 |
teknoid |
beatzombies: what's the resulting html? |
# |
Aug 7th 2008, 16:42 |
beatzombies |
teknoid: yes, echo($item['ContributorsItem']['contributed']); produces the correct value |
# |
Aug 7th 2008, 16:41 |
teknoid |
beatzombies: yeah, that should work... is your $item['ContributorsItem']['contributed'] showing the correct value? |
# |
Aug 7th 2008, 16:40 |
beatzombies |
teknoid: i tried that and it does not work. is that what you are talking about? |
# |
Aug 7th 2008, 16:40 |
beatzombies |
teknoid: <?php echo $form->checkbox('ContributorsItem.contributed', array('checked'=> $item['ContributorsItem']['contributed'])); ?> |
# |
Aug 7th 2008, 16:38 |
renan_saddam |
) |
# |
Aug 7th 2008, 16:38 |
renan_saddam |
overwritten |
# |
Aug 7th 2008, 16:38 |
jaredhoyt |
) |
# |
Aug 7th 2008, 16:38 |
renan_saddam |
jaredhoyt: checked... will not overwrided by cake |
# |
Aug 7th 2008, 16:37 |
teknoid |
beatzombies: by using this, you need to add a 'checked' => true/false to your $form->input (or checkbox) |
# |
Aug 7th 2008, 16:36 |
_psychic_ |
unless the column type is a string for some reason :/ |
# |
Aug 7th 2008, 16:35 |
_psychic_ |
probably wont work as a string either |
# |
Aug 7th 2008, 16:35 |
renan_saddam |
jaredhoyt: checking it now.. =/ |
# |
Aug 7th 2008, 16:33 |
beatzombies |
teknoid: http://bin.cakephp.org/view/1996040628 (only the first foreach is relevant right now) |
# |
Aug 7th 2008, 16:33 |
jaredhoyt |
renan_saddam: ah i see... 'created' and 'modified' are normally saved automagically by cake... i'm not sure what happens if you specify the value yourself, but i'd imagine cake would put precedence on your value |