why not separate it to 2 model and set hasMany relationship. it will
be more easier.
On Aug 5, 3:19 pm, hoss7 wrote:
> i have this array:
>
> Array
> (
> [Usercat] => Array
> (
> [subcat_id] => Array
> (
> [0] => 3
>
Does changing your quote pattern help?
echo $this->Form->select('field', array( '1' => '' , '2' =>
'' ),
null, array('onChange' =>
'function(\"yyy\")'));
\" (because php isn't escaping it) will get sent to the output, which
_should_ render
onclick="funct
Hi Cricket,
Thanks for the reply about the behavior being compatible with 1.3. It
sure is and what a great behavior it is. I got it up and running in
under 5 minutes with NO hassle. Something that happens almost never
for me:)
Brad
On Jul 14, 9:12 am, cricket wrote:
> On Wed, Jul 14, 2010
If a button is needed that is labeled as '' and has an
'onClick' attribute with some javascript containing a text parameter
the code can't be created since when 'escape' is set to false in
options (button default) the script is OK but buttons label will not
be encoded.
Setting 'escape' to true HTML
is being deprecated (I believe), you should probably
just remove it and use alternatives.
On Aug 4, 9:06 pm, Jamie wrote:
> At the risk of sounding cheeky: "fix" it by ignoring it. It's not the
> end of the world. It's an invalid tag as far as the (X)HTML standard
> is concerned. The only way to
You use ajax, the controller and return an HTML response.
http://milesj.me/blog/read/62/Doing-AJAX-Calls-In-CakePHP-Part-1-_-The-Front_end
http://milesj.me/blog/read/63/Doing-AJAX-Calls-In-CakePHP-Part-2-_-The-Controller
http://milesj.me/blog/read/64/Doing-AJAX-Calls-In-CakePHP-Part-3-_-The-JSON-R
My best guess, without seeing your test case or fixtures, is that you
need to add the fixture to your $fixtures var in your test case.
i.e.,
class MenuItemTestCase extends CakeTestCase {
var $fixtures = array('app.menu_item', 'app.alias');
}
After doing that, they should load into the test DB.
The technical term, in case you're interested, is called a ternary
operator.
http://php.net/manual/en/language.operators.comparison.php
On Aug 5, 12:30 pm, "Dave Maharaj" wrote:
> Can someone explain what the "?" and the ":" mean?
>
> return ($this->meta['head_title'] ? $this->meta['page_header
you could save all pagination params to the session
and retrieve them from there if not present
On 5 Aug., 16:39, Charles Bueche wrote:
> Hi,
>
> I have a standard baked index view, with the paginator function. My
> problem : if a user goes to page N (N>1), edit a record, and press
> , the index
this is shorten if clouse
so
if (!empty($lol))
print $lol;
else
//do something else...
in shorten will be this:
print (!empty($lol) ? $lol : NULL);
--
LP,
Tilen Majerle http://majerle.eu
2010/8/5 Dave Maharaj
> Can someone explain what the “?” and the ”:” mean?
>
>
>
> return ($this
Can someone explain what the "?" and the ":" mean?
return ($this->meta['head_title'] ? $this->meta['page_header'] : NULL);
Does it mean
return $this->meta['head_title'] IF $this->meta['page_header'] IS NULL / NOT
SET?
I googled it and looked thru php code but cannot seem to find an expla
Awesome, thanks a million for a thorough explanation. I will try this
out
On Aug 4, 11:47 am, cricket wrote:
> On Wed, Aug 4, 2010 at 12:38 PM, spheroid wrote:
> > Thanks, but how would it know what to render? Example, if the page
> > needs to show blog article #23, effectively I need to pas
This is a working solution, however you will eventually run into
problems with this solution. The first may be browser timeout.
Many ISP's have limits on how many emails per hour, and how much data
per hour can be sent out before you are black listed. Whats missing
from your solution is called thr
This is exactly how my app works.
I can as an auth admin via the browser hit my controller action to
send out notifications.
The same Controller action can be called from the shell in interactive
mode in which it outputs info about what emails were sent.
The same Controller action can be called fro
hi,
i found this great artice about refreshing DIVs
http://designgala.com/how-to-refresh-div-using-jquery/
well that is just fine, but how do i inlcude the file reload.php shown
in this line??
$('#loaddiv').fadeOut('slow').load('reload.php').fadeIn("slow");
is there a specific directory in cak
Hi!
You can name your model whatever that fit your needs:
Форма, but, I
have not tested with cirillic letters.
Forma->whateverVariable or $this->Forma->whateverMethod()
should work fine
On Aug 5, 3:39 pm, baur79 wrote:
> Hi,
>
> i need to use LOCALE name for model in view
> is it possable to
i have this array:
Array
(
[Usercat] => Array
(
[subcat_id] => Array
(
[0] => 3
[1] => 1
)
[user_id] => 2
[group_id] => 5
)
)
i want befor save data in usercat table,
Hi!
You have a table businesses and you would like to create
business_customers. Cake, by convention, thinks that
business_customers is a join table for business and, you guess,
customers, and looking for customers and ends with an error because
cannot find it.
On Aug 4, 10:52 pm, Staple wrote:
Hi,
I have a standard baked index view, with the paginator function. My
problem : if a user goes to page N (N>1), edit a record, and press
, the index is back at page 1. Is there a way to come back to the
page N after the save ?
TIA,
Charles
Check out the new CakePHP Questions site http://cakeq
This was answered via email, but aparently google didn't get it in the
group so:
If the table is set to a numeric field (tinyint, smallint, int,
bigint) it will parse out the leading zero - the best would be a
varchar for how many characters you need. e.g. if you're storing your
numbers as 09+124-
I have concluded SaveAll does not work if you have multiple hasMany
models and the first one (maybe others?) has no data. I have tried
many, many things and it just does not save the data.
So I have resorted to normal save() for the main model then individual
saves for each hasMany model using the
Hi,
i need to use LOCALE name for model in view
is it possable to find solution like this
and use in view
echo $this->Officialform->customname
or it better to write custom user function for model,
best regards
Baurzhan
Kazakhstan / Shymkent city
Check out the new CakePHP Questions site http
ok got this one with luck...
turned out the tmp-file is created during the acutal uploading
process...so when i execute the second process the tmp-file will not
be there...i made a workaround
so this problem is solved :)
Check out the new CakePHP Questions site http://cakeqs.org and help oth
Hi
I am completely confused...
I have several hasMany relationships in a model. I have a page that
allows the user to add multiple rows of data to each of these hasMany
tables. If the first hasMany data is entered, then any subsequent data
is saved using SaveAll too. BUT if the first hasMany data
On Thu, Aug 5, 2010 at 6:19 AM, keymaster wrote:
> The context is a standard ecommerce platform.
>
> A Country hasMany States.
> Some Countries have no States.
> A Region can be made up of either:
> 1. entire Countries, or
> 2. States within a Country.
I suggest you use only the 2nd definition. I
I have resolved using select() instead of input():
echo $form->input('author_id', $authors);
I'm using cake 1.3.3 and author array was a simple one-dimensional
array.
I've not idea about why that problem appears. Bug?
On 5 Ago, 13:46, cricket wrote:
> On Wed, Aug 4, 2010 at 3:26 PM, Mariano C.
On Wed, Aug 4, 2010 at 3:26 PM, Mariano C. wrote:
> Alas. nothing change, valid author_id value is still inside array.
>
> Analyzing authors select form appear like:
>
>
> if I remove last [] on the fly(with Firebug), the insert happen
> without problem cause (I suppose) author_id is no more
> [
There's a tutorial to realize a very simple authentication control
with acl and without possibility for shell connection?
I need a very simple system
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because
Sounds like you need to simplify.
Everything there is a region, and a region would have a type.
A region can belong to another region through a child-parent relationship.
Country is a Region
State is a Region
Region is a Region
So:
Region
- id
- parent_id
- type
- name
This will allow you to mo
The context is a standard ecommerce platform.
A Country hasMany States.
Some Countries have no States.
A Region can be made up of either:
1. entire Countries, or
2. States within a Country.
The following Data Model does not work:
Region HABTM Country hasMany State
... because there are Countrie
hi,
this is what happens. a user can upload a picture during an editing
process, this is supposed to be a preview. then the image gets saved
to a temp directory that is written in the image array, with the
attribute [tmp_name]. the dir in there is ...xampp/tmp/file.tmp...this
process happens with
oki...got it :)
i named the buttton and checked for params forms nameofbutton
thanx to you :)
On 5 Aug., 09:40, Tomfox Wiranata wrote:
> oh..if i name the button 'tut'
>
> then the array says:
>
> Array
> {
> [tut] =>
>
> }
>
> On 5 Aug., 09:37, Tomfox Wiranata wrote:
>
> > first of all thx to
I'm using David Persson MediaPlugin.
With the version relative to cake 1.2 all works fine.Now I'm upgrading
my web application to cake 1.3 so I try to use
the Media Plugin version relative to cakephp 1.3.
I have some problem with the use of callback "transferTo" instead of
'destinationFile' config
oh..if i name the button 'tut'
then the array says:
Array
{
[tut] =>
}
On 5 Aug., 09:37, Tomfox Wiranata wrote:
> first of all thx to both of you. i appreciate it.
>
> @Dan:
>
> cake outputs:
>
> no characters in the first row (i guess thats for this.>data??) and
> then:
>
> Array
> {
>
> }
>
>
first of all thx to both of you. i appreciate it.
@Dan:
cake outputs:
no characters in the first row (i guess thats for this.>data??) and
then:
Array
{
}
@sunsu
did not work^^although it makes sense..even to me lol
On 4 Aug., 16:00, sunsu sunsu wrote:
> hi,
> give the submit button a n
35 matches
Mail list logo