My apologies to everyone who got the following spam message.
My account got compromised somehow.
I hope it didn't cause any trouble to anyone, and it won't happen again
(changed password).
I'm really sorry about this. Thank you very much.
Sohei
-Original Message-
From: Sohei Okamoto
Dear friend,
A good news for you! I bought a laptop from Frioffere. Luckily, I was
one of their first 100 customers that day, so they sold it to me at
half price. Only 5 days later, I received my laptop. It is really
high-quality.
Same products, much lower prices! Share my happiness quickly. Come
The array constructed by selectTag after submit contains keys as its values,
so I believe you can just array_flip() that array for next time, which
will have keys as its keys.
No need to change the helper.
Hope this helps.
Sohei
--~--~-~--~~~---~--~~
You
First of all, $data is a local variable, so it won't change anything
in invalidFields().
Second, even if you modify $this-data, it will not be used in invalidFields().
In the code below, after first if (empty($data)), there is passed data
or copy of $this-data.
Then at if (!empty($data)), $data
In beforeSave(), before returning false, you can do$this-invalidate($field_name);To me, beforeValidate() seems a little more logical place to put that, though.Hope it works for you.Sohei
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
If each row corresponds to the data from model which has id field, maybe I would make each checkbox with the row's id as its value,then you will receive the array with selected rows' id.Am I missing anything?
Hope this helps.Sohei
--~--~-~--~~~---~--~~
You received
Like other people said, if you already have data set, count($comments) would be good.If you are only interested to the count and not having the data, then I would do$num_comment = $this-Comment-findCount(array(post_id = $post_id));
$this-set(num_comment, $num_comment);For the formatting functions,
[EMAIL PROTECTED] If it is really causing some problem or bothers you, but you still want to use Html helper,why not write a simple wrapper helper that strip out id attribute when you don't specify?
class HtmlwrapperHelper extends Helper { var $helpers = Array(Html); function input($fieldName,
Sorry, I accidentally sent in the middle.But anyway, do some checking on attributes and preg_replace the output from the Html helper.Would that be a bad practice, or fine approach in Cake?Sohei
--~--~-~--~~~---~--~~
You received this message because you are
What is your debug level? Can you turn it to higher and see if there is any warning?I haven't discovered exact cause yet, but I had some problem with excuting same page twicewhen there is session warning about sending header.
Just in case.Sohei
If you are using same version of CakePHP as me (latest one:1.1.7.3363),then the error at line 1019 is with foreach and $records not being an array.$records = $model-findAll($field = '$id', $model-primaryKey, null, null);
foreach($records as $record) {
The showEmpty option is true by default.?php echo $html-selectTag('File/category_id', $cats, null, null, null, false); ?It is in API
http://api.cakephp.org/class_html_helper.html#0a0a7c56c21b7d7352fd99158350dfc5Sohei
--~--~-~--~~~---~--~~
You received this message
Unfortunately, I don't think there is an easy solution for that.However, If you have some sort of custom validation to assert the error, for example in the controller,if( empty($this-data['Person']['Address']['address1']) )
$this-Person-validationErrors['Address']['address1'] = 1;then you can make
I am not sure exactly what is your intention, but isn't the problem using same name for Model and Component?Either reference must be overwritten in controller.Also, if you want to access to model and/or set data for view,
it should be done through controller, I believe.So, in component, it should
I haven't tried this yet, but I think this is what you are looking for.http://wiki.cakephp.org/tutorials:pagination
It looks promising.Sohei
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake PHP group. To post to
>From what I understand,
HTML helper explodes the input name by slash, and takes the first one as model and second one as field name. The rest of the name is ignored.
Then make the onput tag by
input name=data[%s][%s] %s/
where first %s is model name, second is field name, and the last one is the
16 matches
Mail list logo