Re: Default controller when unspecified?

2008-04-25 Thread Adam Royle
Look in app/config/routes.php and you will see default route. ("/") On Apr 26, 7:41 am, Opblah <[EMAIL PROTECTED]> wrote: > Hi, > > How do I specify a default controller for my site? If my domain > ishttp://www.mydomain.com, I want to be able to specify a certain > controller to use by default

Re: Association Frustration

2008-04-25 Thread Adam Royle
Sounds like you're not setting the recursive level high enough. I'm guessing you're doing something like: $skateparks = $this->Skatepark->find('all'); Simple solution is to do: $this->Skatepark->recursive = 3; $skateparks = $this->Skatepark->find('all'); Better solution (but more involved) is

Re: a couple of small things I can't figure out

2008-04-25 Thread damo
Hi Simon, this is what I have put in: view: create('Result');?> Subject Student Number Quiz Result "; echo ""; echo $form->input("Result.{$i}.subject", array('label' => '')); echo ""; echo ""; echo $form->input("Result.{$i}.student", array('label' =>

Problem with OS X and .ctp files

2008-04-25 Thread iBob
Something totally noob coming up so beware! I've just started to use Mac OS X (Leopard) and I love it alot. I think I've also fallen in love with cakePHP though I havent done anything with it yet.. just tryied to read and learn. However today I finally had time and I downloaded cakePHP beta 1.2 a

Default controller when unspecified?

2008-04-25 Thread Opblah
Hi, How do I specify a default controller for my site? If my domain is http://www.mydomain.com, I want to be able to specify a certain controller to use by default when going to http://www.mydomain.com (so maybe it would be the same as going to http://www.mydomain.com/products or something). I

Re: a couple of small things I can't figure out

2008-04-25 Thread damo
thanks again b logica. Have tried what you have suggested with no luck. What I am passing is just an integer. I am passing this integer to the function so I know which student the file is for. I just had a thought that it might be easier to just pass the variable in the controller rather than

Association Frustration

2008-04-25 Thread Kyle Decot
I am making a skatepark directory and I'm having some troubles with my associations. I have: VALID_NOT_EMPTY); var $hasMany = array("Comment","Photo"); } ?> I think I am doing something wrong because I am not getting any infomation about the user when looking at my comment inform

Re: Cake 1.2 Undefined Variable: paginator

2008-04-25 Thread AussieFreelancer
Hi Thanks for that, I have checked out your blog article, and I have also played around with the standard code, and I have found that if I use 'Message.message_status_id' => '<= 2' It works... So not sure how that does the job actually, but seems to be working.. Is there a reason why the paginat

Re: Cake 1.2 Undefined Variable: paginator

2008-04-25 Thread Chris Hartjes
On Fri, Apr 25, 2008 at 9:30 PM, AussieFreelancer <[EMAIL PROTECTED]> wrote: > > Right you are! :D Man I'm going crazy... passed the object to the view > using $data = $this->paginate('Message'); and it started working :D > Sorry for the hassle, thanks for the help :) > > On a slightly side no

Re: Cake 1.2 Undefined Variable: paginator

2008-04-25 Thread AussieFreelancer
Right you are! :D Man I'm going crazy... passed the object to the view using $data = $this->paginate('Message'); and it started working :D Sorry for the hassle, thanks for the help :) On a slightly side note, when it comes to adding conditions, I need the following condition: 'Message.user_id =

Re: Sharing Codebase

2008-04-25 Thread Steve
Hmm, Looks like that could do the trick. I'll have to play around with that. Thanks On Apr 25, 6:04 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote: > in bootstrap.php you can add additional paths - each project has its own > config settings also with paths to centrall models vendors and controller

Re: Cake 1.2 Undefined Variable: paginator

2008-04-25 Thread Sam Sherlock
$this->set('data', $this->Message->findAll('Message.user_id = ' . $this->Auth->user('id') . ' AND Message.message_status_id IN (1, 2)', null, 'Message.message_status_id, Message.importance, Message.created DESC')); should be something like $this->paginate['Message']['conditions']['Message.user_i

Re: Cake 1.2 Undefined Variable: paginator

2008-04-25 Thread Chris Hartjes
On Fri, Apr 25, 2008 at 8:26 PM, AussieFreelancer <[EMAIL PROTECTED]> wrote: > > Hi All, > > I have just had a look through the groups, and tried a couple of > things suggested, but for some reason I can't get the paginator > working properly still. > What about it isn't working? You getting

Cake 1.2 Undefined Variable: paginator

2008-04-25 Thread AussieFreelancer
Hi All, I have just had a look through the groups, and tried a couple of things suggested, but for some reason I can't get the paginator working properly still. This is my controller: ** CONTROLLER *** class MessagesContro

Re: Elementary Data Validation??

2008-04-25 Thread Jee
grigri, Thanks so much for taking time for such an in-depth reply. I particularly appreciated the help with the regular expressions. I am not very good at those! :) I would like to clarify that all of the fields do respond properly per the validation routines except the 'states' select field a

Re: How to get JSON Response with AJAX link

2008-04-25 Thread Sam Sherlock
here is a simplification of how I make json requests I am using jquery views/layouts/ajax.ctp header('Content-Type: text/x-json'); e(json_encode(Array('title' => $title_for_layout, 'content' => $content_for_layout))); webroot/js/common.js in a function that I attach to all links funct

Re: Sharing Codebase

2008-04-25 Thread Sam Sherlock
in bootstrap.php you can add additional paths - each project has its own config settings also with paths to centrall models vendors and controllers defined there http://groups.google.com/group/cakephp-edge/browse_thread/thread/2301489ed8aa8044 hth - S On 25/04/2008, Steve <[EMAIL PROTECTED]> wrot

Re: renderElement strange behavior

2008-04-25 Thread Joel Perras
You need to pass the data that you want to use in the element: $this->renderElement('browser_toolbar', $data_to_be_passed); In your case, it would be the $paginator object. -J. On Apr 25, 5:38 pm, rob5408 <[EMAIL PROTECTED]> wrote: > Sorry, most recent cake 1.2 > > On Apr 25, 5:25 pm, rob5408 <

Sharing Codebase

2008-04-25 Thread Steve
Ok, I'm developing an application and rather than installing it for each of my clients that are going to use it, I'd like for it to be installed on a single directory and have each client site able to access it. The only thing that I want each client site to have unique is the following - Own da

Re: renderElement strange behavior

2008-04-25 Thread rob5408
Sorry, most recent cake 1.2 On Apr 25, 5:25 pm, rob5408 <[EMAIL PROTECTED]> wrote: > I have a block of html/php i need to show twice on the page, so i > thought i'd put it in an element. The content of the element is... > > > > > < Prev | Next > td> > > counter(array('format' => __('Displaying

renderElement strange behavior

2008-04-25 Thread rob5408
I have a block of html/php i need to show twice on the page, so i thought i'd put it in an element. The content of the element is... < Prev | Next > counter(array('format' => __('Displaying %start%-%end% of %count%', true))); ?> Jump to page params['paging']['Photo'] ['pageCount']); unset($p

Re: Email Attachments Don't Work (1.2)

2008-04-25 Thread Doug @ Straw Dogs
For anyone else suffering this problem the solution is: For some reason Cake won't do attachments unless you state the filePaths first. This is the case even if you are using an absolute path for your attachments. Thanks. On Apr 21, 2:47 pm, Doug <[EMAIL PROTECTED]> wrote: > I've done a scount

Re: save() keeps creating new records, not updating old ones

2008-04-25 Thread Chez17
So I finally figured this out. Here is the solution: Above this call in the if statement: $this->Profile->Info->save($this->data) you need to enter: $this->Profile->Info->setId( $temp['Info']['id'] ); Thanks for both your help and time. --~--~-~--~~~---~--~~ Yo

Redirect path problem in production setup

2008-04-25 Thread Dino
Problem: I am moving a site from a Cake 1.1 development configuration to a production configuration in a shared hosting environment. I am using mod_rewrite. I can display pages successfully using the url http://www.domain_name.com/controller/action and also using http://www.domain_name.com/inde

Validation problem in CakePHP 1.2

2008-04-25 Thread Cody Sortore
Hey everyone! I'm a major newb to CakePHP only been using it for 2 weeks now and I've run into a little trouble with some validation. I've got a user registration page that I'm trying to create finally got the check between passwords to work thanks to Chris Hartjes' tutorial on user registration

How to get JSON Response with AJAX link

2008-04-25 Thread Tomka
Hello. I try to get a JSON object as response of an AJAX request. The code in my view looks like this: echo $ajax->link("TEST", array("controller" => "mycontroller", "action" => "myjsonview"), array("complete" => "testfunction(request, json);") ); If I set the o

Re: Cake 1.2 final release date

2008-04-25 Thread b logica
I'll add that, with the changes that have occurred *within* the 1.2 branch itself, it seems odd that we're not looking at a 2.0 release. IMO, 1.2 should have been released long ago with many of the current changes moved into a 2.0 target branch. And, yes, I realise that development is never as ti

Re: problem making a select box

2008-04-25 Thread b logica
One should get in the habit of always using single quotes unless there is a variable inside that should be parsed (and, if so, it should be wrapped with { and } to at least make it obvious). Using double quotes without variables is wasting parse cycles. On Fri, Apr 25, 2008 at 10:08 AM, seb <[EMA

Re: order a find('list')?

2008-04-25 Thread b logica
Thanks a bunch. And I'm going to bookmark the book site. (Now, if someone would only remove that irritating hover style change on the code blocks ...) On Fri, Apr 25, 2008 at 1:11 PM, <[EMAIL PROTECTED]> wrote: > > http://book.cakephp.org/view/449/find > > > On Apr 25, 9:03 am, "b logica" <[E

Re: version 1.2 scaffolding drop down.

2008-04-25 Thread Samuel DeVore
As a general rule, I try to check php classes first then http://api.cakephp.org/1.2/classes.html to make sure I'm not being a dork and picking something that is going to bite me in the a$$ later ;) Sam D On Fri, Apr 25, 2008 at 10:36 AM, Jose Gomez <[EMAIL PROTECTED]> wrote: > > That did it. >

Re: version 1.2 scaffolding drop down.

2008-04-25 Thread Jose Gomez
That did it. Thanks so much! On 4/25/08, Samuel DeVore <[EMAIL PROTECTED]> wrote: > > I wonder if it might be that Model/ Models are reserved words > > Sam D > On Fri, Apr 25, 2008 at 9:37 AM, JoC <[EMAIL PROTECTED]> wrote: > > > > Hello All, > > before I get yelled at I tried all the solutions

Re: order a find('list')?

2008-04-25 Thread search . the . group
http://book.cakephp.org/view/449/find On Apr 25, 9:03 am, "b logica" <[EMAIL PROTECTED]> wrote: > omg that was so freaking obvious! I'd been trying all sorts of things; > that never occurred to me. > Thanks a bunch! > > On Fri, Apr 25, 2008 at 1:53 AM, squawk <[EMAIL PROTECTED]> wrote: > > >  Try

Re: version 1.2 scaffolding drop down.

2008-04-25 Thread Samuel DeVore
I wonder if it might be that Model/ Models are reserved words Sam D On Fri, Apr 25, 2008 at 9:37 AM, JoC <[EMAIL PROTECTED]> wrote: > > Hello All, > before I get yelled at I tried all the solutions I found on here > before posting none of them worked. > I have the following structure and I ca

Re: Cake 1.2 final release date

2008-04-25 Thread seb
> And looking at the bug list in trac, I wouldn't say there are any > major changes in the pipeline either. Going from 1.1 to 1.2 isn't > totally trivial, so the sooner you get started on such a transition > the better. If you are waiting for a "final" release before making > that change, I woul

version 1.2 scaffolding drop down.

2008-04-25 Thread JoC
Hello All, before I get yelled at I tried all the solutions I found on here before posting none of them worked. I have the following structure and I can't get scaffolding to generate a drop down of Manufacturers instead a get a text box. tables CREATE TABLE manufacturers ( id smallint(6) NOT N

Re: Editing paginator URL

2008-04-25 Thread mehodgson
I don't know if this was something to do with my setup, but I had problems with setting the url options for pagination when using admin routing. my pagination links were coming out /admin/users/admin_index/ page:2/search:term I had to add an action parameter to the url options array to make it wo

Re: order a find('list')?

2008-04-25 Thread b logica
omg that was so freaking obvious! I'd been trying all sorts of things; that never occurred to me. Thanks a bunch! On Fri, Apr 25, 2008 at 1:53 AM, squawk <[EMAIL PROTECTED]> wrote: > > Try this: > > find('list', array('order'=> 'field')); > > > > On Apr 24, 11:21 pm, "b logica" <[EMAIL PROTECT

Re: Cake 1.2 final release date

2008-04-25 Thread aranworld
For the last few months I have been using the nightly build. It is pretty stable. If you follow the change log, it has been a while since any application breaking syntax changes have been introduced. And looking at the bug list in trac, I wouldn't say there are any major changes in the pipeline

Re: Init ACL with CLI?

2008-04-25 Thread aranworld
1) The syntax in the end is correct. You could also do: cake acl create aro root superadmin 2) When you create a node in the CLI, the model and foreign_key fields are blank. If you want these fields added automatically, then you need to add the nodes from within your application using the m

Re: problem making a select box

2008-04-25 Thread rtanz
thanks alot guys everything clear now :) On Apr 25, 4:08 pm, seb <[EMAIL PROTECTED]> wrote: > rtanz wrote: > > cheers that worked perfectly, another thing while we're at it, i am > > noticing that the code works the same whether you use single or double > > quotes, is one or the other better? Sor

Re: Slow...

2008-04-25 Thread Pierre MARCOURT
Thanks for all your advices. I actually did not use the Bindable behavior and the packing Scriptaculous. You are right NOSLOW about the Debug, I set it to 0 and it is better but still not the way I want. Anyway, thanks for the tips, I going to look at these right now ! NOSLOW a écrit : > I, too

Re: Slow...

2008-04-25 Thread NOSLOW
I, too, use the Bindable behavior (couldn't live without it now ;). My point was that Cake will still load all the related models recursively for the controller action you're calling before you can dynamically unbind the relationships. The only way I saw to prevent this was to not define all the r

View this page "CakePHP In The Wild"

2008-04-25 Thread Sliv
-Restored missing link http://viewvc.svn.mozilla.org/vc/addons/branches/ Click on http://groups.google.com/group/cake-php/web/cakephp-in-the-wild - or copy & paste it into your browser's address bar if that doesn't work. --~--~-~--~~~---~--~~ You received this mess

Re: Slow...

2008-04-25 Thread Jost
Hello everybody, I, too, use Firefox and Firebug. Firebug running really slows down the loading/initialization speed of any page that uses a lot of javascript. Additionally the Script.aculo.us libraries a rather big. A suggestion would be to google for packed versions of Script.aculo.us and Prot

Init ACL with CLI?

2008-04-25 Thread avairet
Hi everybody, I'm trying to use the ACL, but I don't understand some stuff. I have created the 3 tables (aros, acos, aros_acos) with the CLI. Fine. I have a Groups table (called 'admin_groupes' in my case). I have a Users table (called 'administrateurs' in my case), with a FK called "admin_group

HasMany HTML Selects in Baked Views

2008-04-25 Thread pr1001
This is a simple thing but I don't think it's currently supported... Running 'cake bake view' (or 'cake bake all' in my specific case) creates add and edit view files with lines such as: echo $form->input('contact_id'); When the value (e.g. 'contact_id') is a foreign key for an another object in

Re: Cake 1.2 final release date

2008-04-25 Thread dr. Hannibal Lecter
There is a hint in this article (at the very end) that it might be out very soon.. http://bakery.cakephp.org/articles/view/after-3-years-looking-back-and-moving-ahead Let us pray.. :-) On Apr 25, 4:02 pm, seb <[EMAIL PROTECTED]> wrote: > Well, this might have been asked a few times before but d

Re: problem making a select box

2008-04-25 Thread seb
rtanz wrote: > cheers that worked perfectly, another thing while we're at it, i am > noticing that the code works the same whether you use single or double > quotes, is one or the other better? Sorry might be a php thing and > nothing related to cake, im not an expert in php itself either. thanks

Re: problem making a select box

2008-04-25 Thread dr. Hannibal Lecter
Well, if you put double quotes, you then can put variables inside a string and they will be replaced by proper values. Single quoted strings are not parsed. I tend to use single quotes because it is supposedly a bit faster to process by the PHP parser. You can read more about these here: http:/

Cake 1.2 final release date

2008-04-25 Thread seb
Well, this might have been asked a few times before but does anybody have any idea when 1.2 will be available as stable release ? Yes I know "When it's done" :D --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

Re: Can Cake Do Calculated Ordered List SQL Queries?

2008-04-25 Thread seb
Mark Lawton wrote: > Hi Everyone, > > I would like to switch to using Cake, but looking at > http://manual.cakephp.org/view/66/models , I don't see an obvious way > to ask for a calculated ordered list from a database - and these are > indispensable to our website. Suppose, for example, one wante

Re: problem making a select box

2008-04-25 Thread rtanz
cheers that worked perfectly, another thing while we're at it, i am noticing that the code works the same whether you use single or double quotes, is one or the other better? Sorry might be a php thing and nothing related to cake, im not an expert in php itself either. thanks On Apr 25, 3:52 pm,

Re: Can Cake Do Calculated Ordered List SQL Queries?

2008-04-25 Thread grigri
Using any type of sql function is easy in cake. Your example would be as simple as: $data = $this->Cake->find('all', array( 'fields' => array('price', 'name', '(2*protein+LOG(fibre)-10*salt- sugar-fat) AS health'), 'order' => 'health', 'limit' => 10 )); The one 'gotcha' is that the result

Re: problem making a select box

2008-04-25 Thread dr. Hannibal Lecter
Have you tried this: echo $form->select('active', array('1' => 'Yes', '2' => 'No'), '1', array(), false); This should work for 1.2 On Apr 25, 11:28 am, rtanz <[EMAIL PROTECTED]> wrote: > hi i would like to make a select box with a label and dropdown, > default value 'Yes' and no empty value. I

Re: problem making a select box

2008-04-25 Thread seb
rtanz wrote: > tried that and got this error > > Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/jpgalea/ > public_html/survey/app/views/surveys/edit.ctp on line 9 Sorry for that, I should have done a cut & paste from my own code. Made a typo by forgetting to enclose all things re

Re: Can Cake Do Calculated Ordered List SQL Queries?

2008-04-25 Thread Chris Hartjes
On Fri, Apr 25, 2008 at 9:26 AM, Mark Lawton <[EMAIL PROTECTED]> wrote: > > select price, name, 2 * protein + log(fibre) - 10 * salt - sugar - fat > as health order by health limit 10 > > Can somebody tell me how we would be able to do such lists in Cake, > please? Try this, but I must warn y

Re: how to save a particular field in php cake

2008-04-25 Thread mbavio
Cookbook, API, Google, etc, etc, etc Cheers, mbavio mbavio.com.ar On Apr 25, 10:17 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On Fri, Apr 25, 2008 at 5:41 AM, Rocky <[EMAIL PROTECTED]> wrote: > > > Plz help me out > > > How to save a particular field in php cake > > Before you ask you

Re: Slow...

2008-04-25 Thread NOSLOW
I've had some issues too and will share some of my findings in hopes some more knowledgeable people will correct me where I'm wrong: Is debug level set to 0? If there are lots of models loading (and not being cached) you'll hit some overhead. Probably not related to your specific problem, but I'

Re: Session need HELP

2008-04-25 Thread Chris Hartjes
On Fri, Apr 25, 2008 at 8:51 AM, KND <[EMAIL PROTECTED]> wrote: > > If i can set the session in controller.. > In that session is destroy i am click another controller.. > > I need to maintain the session for all the controller.. > > > Please help me how to maintain the session values.. >

Re: Problem in using Ajax to submit a form

2008-04-25 Thread rob30
Hi, Maybe try submiting not by ajax->form but ajax->submit eg echo $form->create('Sphere'); ... echo $ajax->submit('save', array('url'=>'saveSpheres','update'=>'sphere_val', 'before' => 'prepareSpheres()')); --~--~-~--~~~---~--~~ You received this message because

Can Cake Do Calculated Ordered List SQL Queries?

2008-04-25 Thread Mark Lawton
Hi Everyone, I would like to switch to using Cake, but looking at http://manual.cakephp.org/view/66/models , I don't see an obvious way to ask for a calculated ordered list from a database - and these are indispensable to our website. Suppose, for example, one wanted the 10 healthiest cakes: the

Session need HELP

2008-04-25 Thread KND
If i can set the session in controller.. In that session is destroy i am click another controller.. I need to maintain the session for all the controller.. Please help me how to maintain the session values.. --~--~-~--~~~---~--~~ You received this messag

Re: reset Session variables without any visible cause

2008-04-25 Thread Chris Hartjes
On Sun, Mar 16, 2008 at 8:58 AM, jano <[EMAIL PROTECTED]> wrote: > > I'm sorry to bother you with this strange problem, but I don't know > really how manage it. > Permorfing some action in my cake application, variables session are > 'sometimes' resetted. It happens not so often, and in a unpr

Re: how to save a particular field in php cake

2008-04-25 Thread Chris Hartjes
On Fri, Apr 25, 2008 at 5:41 AM, Rocky <[EMAIL PROTECTED]> wrote: > > Plz help me out > > How to save a particular field in php cake > Before you ask your next question, I suggest you check out http://book.cakephp.org, since so far your questions reveal that you haven't done any research bef

Re: Problem with widget in opera.

2008-04-25 Thread Chris Hartjes
On Fri, Apr 25, 2008 at 2:24 AM, lekshmi <[EMAIL PROTECTED]> wrote: > > > Please help... > Does this look like a "Solving problems with Javascript in Opera" mailing list? If the javascript is being generated by Cake, then people will answer. If it isn't, then I believe that the

Re: how to save a particular field in php cake

2008-04-25 Thread [EMAIL PROTECTED]
what he said but set your ID first $this->Model->id = 34; $this->Model->saveField('field_name', $field_value); On Apr 25, 5:41 am, Rocky <[EMAIL PROTECTED]> wrote: > Plz help me out > >     How to save a particular field in php cake > > Thanks > Rocky --~--~-~--~~~---

Re: how to save a particular field in php cake

2008-04-25 Thread Adam Royle
Dude $this->YourModel->saveField($field, $value) On Apr 25, 7:41 pm, Rocky <[EMAIL PROTECTED]> wrote: > Plz help me out > > How to save a particular field in php cake > > Thanks > Rocky --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: Validation of related models in cake 1.2

2008-04-25 Thread ygneo
Hi James. Yes I'm sure about the naming, but I didn't thought in explictilly call validates for the related model. Where I do that? In beforeSave of the related model, calling: this->validate(); Thanks very much for help. On 23 abr, 14:25, James K <[EMAIL PROTECTED]> wrote: > I haven't had thi

how to save a particular field in php cake

2008-04-25 Thread Rocky
Plz help me out How to save a particular field in php cake Thanks Rocky --~--~-~--~~~---~--~~ 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 unsubs

Session

2008-04-25 Thread KND
If i can set the session in controller.. In that session is destroy i am click another controller.. I need to maintain the session for all the controller.. Please help me how to maintain the session values.. --~--~-~--~~~---~--~~ You received this message bec

Re: HABTM and conditions ?

2008-04-25 Thread Neveldo
Thank for your link ! I think it will be helpful for my issue :) Cordially, Neveldo - http://www.neveldo.fr --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-p

Re: problem making a select box

2008-04-25 Thread rtanz
yes amit i used that syntax originally, but now i want to add those other options, i.e. I want Yes to be selected by default and I also dont want any blank fields. This is what I would like to achieve, so i need to add some more parameters... On Apr 25, 1:07 pm, "Amit Badkas" <[EMAIL PROTECTED]>

Re: problem making a select box

2008-04-25 Thread Amit Badkas
- You should use syntax like echo $form->select('active', array(0 => 'Yes', 1 => 'No')); On Fri, Apr 25, 2008 at 3:56 PM, rtanz <[EMAIL PROTECTED]> wrote: > > tried that and got this error > > Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/jpgalea/ > public_html/survey/app/views/su

Re: Elementary Data Validation??

2008-04-25 Thread grigri
Well, I can see a few problems straight away: * You're confusing the 'required' and 'allowEmpty' validation keys. 'required' means it must be present in the array, 'allowEmpty' controls whether empty values are allowed. 'allowEmpty' is checked before anything else, so an empty field without `'al

Re: Form data not available in controller

2008-04-25 Thread Amit Badkas
- Please debug the $this->params['form'] and $this->data in your controller's action and take a look at it if something is not working properly On Thu, Apr 24, 2008 at 9:49 PM, zendrumz <[EMAIL PROTECTED]> wrote: > > Hey everyone, > > I'm a cakephp newbie putting together my first project. I'm tr

Re: problem making a select box

2008-04-25 Thread rtanz
tried that and got this error Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/jpgalea/ public_html/survey/app/views/surveys/edit.ctp on line 9 On Apr 25, 12:08 pm, seb <[EMAIL PROTECTED]> wrote: > rtanz wrote: > > hi i would like to make a select box with a label and dropdown, > >

Re: problem making a select box

2008-04-25 Thread Amit Badkas
On Fri, Apr 25, 2008 at 2:58 PM, rtanz <[EMAIL PROTECTED]> wrote: > > hi i would like to make a select box with a label and dropdown, > default value 'Yes' and no empty value. I am trying this code but its > not working as i want to, can you help me out? > >echo $form- > >select('active',a

Re: problem making a select box

2008-04-25 Thread seb
rtanz wrote: > hi i would like to make a select box with a label and dropdown, > default value 'Yes' and no empty value. I am trying this code but its > not working as i want to, can you help me out? With Cake 1.2, you should try this : echo $form->input("type"=>"select","options"=>array("0"=>"

Re: Form data not available in controller

2008-04-25 Thread seb
> Sorry, I just meant the error message I added in my controller (the > flash message in the else clause) i.e. cakephp doesn't think there's > anything in $this->data. In your controller, did you try this : $this->Model->create(); $this->Model->save($this->data); instead of : $this->Model->cre

Re: MySQL Views support in Cake 1.2

2008-04-25 Thread grigri
I know nothing about using MySQL views, but I've never found it a problem to filter/sort on deep associations. The trick is to use dynamic associations - a temporary `hasOne` instead of a `hasMany`, so that cakephp performs a join and you can then filter inline in the query. For example, let's a

Re: Adding new records into two models with one form (or: trying to validate without saving)

2008-04-25 Thread MonkeyGirl
>    First, set the data to the model: > >    $this->ModelName->set( $this->data ); > >      $this->ModelName->set( $this->data ); > >    Then, to check if the data validates, use the validates method of the > >    model, which will return true if it validates and false if it doesn't: > >      if

Re: Routing to RSS feed

2008-04-25 Thread seb
> my only idea would be creating an rss controller and then redirect to > main/index.rss > obviously that is not really pretty Well, that's an idea but it still sounds as a workaround. For the moment, I've created an empty rss folder at the server root and a .htaccess with a "redirect permanent

Re: Displaying in Input Field Value of Parent Element

2008-04-25 Thread Galdan
Hi togehter, first i've to thank you. Both things works now very fine. But for the concatenation i've antoher question. In the Members view i can access the new variable "fullname" without any problems. But it's not getting passed down to the bill, so i can't reach it there. Do you have an id

problem making a select box

2008-04-25 Thread rtanz
hi i would like to make a select box with a label and dropdown, default value 'Yes' and no empty value. I am trying this code but its not working as i want to, can you help me out? echo $form- >select('active',array('0'=>'Yes','1'=>'No','Yes',null,false)); shown here: http://jpgalea.com

Custom View class in a Controller

2008-04-25 Thread Marcelius
Hello Can someone please tell me how to get the Controller::view property to work properly? I set the view to a custom view class in a controller (in the plugins folder). Whatever I tried, I didn't got Cake to load my view in a 'normal' expected way with any naming convention what so ever. What

Re: reset Session variables without any visible cause

2008-04-25 Thread Thomas Jones
Checked with debug set to 0, unfortunately it didn't help. On Apr 24, 5:24 pm, cradick <[EMAIL PROTECTED]> wrote: > I don't have the problem anymore, but not exactly sure why it went > away. I seem to remember that the error was related to a stack > overflow due to the debug level set at 2 (pro