Re: Help with validation

2009-10-19 Thread WebbedIT
Firstly, you are trying very simple validation so there must be something very simple wrong with it that's easily fixed when identified. Have you got validation working anywhere else in your app? When you say hit submit and nothing do you mean it shows the form again and is this because it has

Re: Model Controller Question

2009-10-19 Thread WebbedIT
If you want to edit a user's tools, I would say you do that from the User model, if you want to edit a tool's users then you do that from the Tool model. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group.

Re: Simple question from a newbie seeking help from the gods

2009-10-19 Thread Martin Westin
No, you still need a controller action... but that action does not need to do more than call the model in this case... well, and format response data for the view and things like that. The point was that you mentioned calling one controller from another... that was the main reason behind pushing

Re: Is it assumed that you should know PHP well before starting with Cake or can you disregard this fact?

2009-10-19 Thread Hrmo
IMHO, if you already are an experienced programmer, you can learn PHP and CakePHP simultaneously without much trouble.Differences between object-oriented languages are minimal (compared to other paradigms) When I started with CakePHP I already had experience with PHP, but when I tried RoR and

Preserving get variables using paginator

2009-10-19 Thread Alex Seim
I would like to know if there is a way to preserve variables passed via form type='get' along with using the pagination. Currently, using the pagination helper, when sorting/browsing, get variables disappear. --~--~-~--~~~---~--~~ You received this message because

Re: Simple question from a newbie seeking help from the gods

2009-10-19 Thread WebbedIT
... and by answering I am not implying I am a God of any kind ;) More a demi-god :P --~--~-~--~~~---~--~~ 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

image upload + translatebehavior

2009-10-19 Thread remolacha
Hi folks Using translatebehavior for text fields, great Using meioupload for image upload, great The two don't seem to mix, however. In the Store controller: var $actsAs = array( 'MeioUpload' = array( 'header' = array( 'fields' =

Re: Preserving get variables using paginator

2009-10-19 Thread grigri
Add this to the top of the relevant view: $q = $_GET; unset($q['url']); if (!empty($q)) { $paginator-options(array('url'=array('?' = $q))); } On Oct 19, 12:32 pm, Alex Seim alex.seimani...@gmail.com wrote: I would like to know if there is a way to preserve variables passed via

Re: Validate zip/postal for Canada OR us

2009-10-19 Thread Josey
actually I was using the default cakephp postal validation but your post directed me towards the creation of a custom validation rule that checked to see if the entry was alphanumeric or just numeric and ran the proper validation rule from there. Thanks for the lead! Josey On Oct 16, 4:48 pm,

App::Objects bug or feature?

2009-10-19 Thread Eugene
Hello everybody! I am using 1.3 builds and upgrading once a week. It worked for me ok before but on Friday I upgraded to latest version and got this error $a_plugins = App::Objects('plugin'); This array is empty if placed in bootstrap now. In controllers it is still ok. Do you have any ideas

RE: Help with validation

2009-10-19 Thread Dave Maharaj :: WidePixels.com
I mean when I hit submit the form gets sent and comes back invalid but nothing is marked as invalid (even when I leave it completely empty). Then same page without refreshing or anything just hit submit on that same returned form it comes back with errors. Even if I have letters / numbers in the

Cake caches flash messages that are wrapped in cake:nocache

2009-10-19 Thread MissYeh
1) First I cleaned all cached views. 2) I have a form on a page to upload a file with a minimum size. I upload a file too small to test the flashmessaging. The desired flashmessage is triggered. 3) But.. before the flashmessage has time to display on the current page I open my about page. The

Re: Models, Tables, and Database Normalization

2009-10-19 Thread Jamie
Also, Jon, keep in mind that Cake will attempt to create a model on the fly (basically AppModel) if it cannot find a model class for a particular table. So if you create a contact_emails table, for example, but you don't make a ContactEmail model class, then your app will still work - you just

Aprendizaje

2009-10-19 Thread ingacastro
Buen día, soy un aprendíz de php y del desarrollo web en general. Así, como se debe aprender orientado a objetos sin necesidad de ir primero a la programación estructurada; considero que debo comenzar de una vez utilizando cakephp para cuando lo aprenda no esté yo desactualizado. Entonces,

Re: Cake caches flash messages that are wrapped in cake:nocache

2009-10-19 Thread MissYeh
Discovered that the view caches only the last cake:nocache / cake:nocache wrapper in the layout. Every cake:nocache /cake:nocache before the last one is not cached. On Oct 19, 4:05 pm, MissYeh miss...@gmail.com wrote: 1) First I cleaned all cached views. 2) I have a form on a page to

Validation Help - All code Included

2009-10-19 Thread Dave Maharaj :: WidePixels.com
This is driving me crazy. User Model: var $validate = array( 'username' = array( 'usernameRule-1' = array( 'rule' = array( 'notEmpty'), 'message' = 'Please choose a Username',

Re: Preserving get variables using paginator

2009-10-19 Thread Alex Seim
Perfect! Thanks! On 19 Οκτ, 15:53, grigri j...@hendersonwebdesign.com wrote: Add this to the top of the relevant view:  $q = $_GET; unset($q['url']);  if (!empty($q)) {          $paginator-options(array('url'=array('?' = $q)));  } On Oct 19, 12:32 pm, Alex Seim alex.seimani...@gmail.com

RE: Validation Help - All code Included - Figured Out

2009-10-19 Thread Dave Maharaj :: WidePixels.com
I got it working. Dave -Original Message- From: Dave Maharaj :: WidePixels.com [mailto:d...@widepixels.com] Sent: October-19-09 2:16 PM To: cake-php@googlegroups.com Subject: Validation Help - All code Included This is driving me crazy. User Model: var $validate = array(

Regular Expression

2009-10-19 Thread Dave Maharaj :: WidePixels.com
I have 'rule' = '/^[a-zA-Z]$/', to allow only letter characters but it does not seem to be working. Is there something wrong with this expression? Thanks, Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Need help with creating a proper model that uses three tables.

2009-10-19 Thread barnent1
Hi All, I have three tables and a java application that uses these tables. I'm building a nice presentation application in cake. I'm having problems getting a model that will display the correct results. Here is the scenerio: Three tables: accounts acctpeers peers account has a one to many

last insert id return after ajax form submit

2009-10-19 Thread hahmadi82
Hi, I have a page that has a Formhelper form and it's submitted via ajax with the $('formid').ajaxForm() function (http://malsup.com/jquery/form/). I was wondering how I can get the controller to return the last insert id of the submitted data to the current page so I can use javascript to put

Trying to create a route for all controller methods

2009-10-19 Thread Spadeworkers
I need to create a route where any /hd/controller/action is routed to / controller/action where / is the root. I am creating a mirror of the whole site. I couldn't find this in either of the manual (routes section) or group pages. Thanks for the help and if I overlooked an answer to this,

Re: Regular Expression

2009-10-19 Thread Maximillian Schwanekamp
On Oct 19, 2009, at 10:41 AM, Dave Maharaj :: WidePixels.com wrote: I have 'rule' = '/^[a-zA-Z]$/', to allow only letter characters but it does not seem to be working. Is there something wrong with this expression? I think you need to specify how many characters you need. E.g. /^[a-

RE: Regular Expression

2009-10-19 Thread Dave Maharaj :: WidePixels.com
Right on, I ended up using 'rule' = array('custom', '/^[A-Za-z ]+$/'), and that seems to work. Thanks, Dave _ From: Maximillian Schwanekamp [mailto:anaxama...@gmail.com] Sent: October-19-09 4:32 PM To: cake-php@googlegroups.com Subject: Re: Regular Expression On Oct 19, 2009,

creating layout with multiple view

2009-10-19 Thread kamiseq
hi, I just started with cakephp so maybe my question is just stupid. anyway form what I learned cakePHP uses layout with all static content that can be mixed with predefined $title_for_layout, $scripts_for_layout, $content_for_layout. but that implies that $content_for_layout holds continuous

Why does the xml serialize uses attributes as a default rather than tags/elements?

2009-10-19 Thread aubiematt
Hey all, Does anyone does the xml serialize uses attributes as a default rather than tags/elements? It would seem like it to me that XML data should use tags rather than elements. Take for example the following array (off the cakephp website): Array ( [Baker] = Array (

Re: creating layout with multiple view

2009-10-19 Thread Ma'moon
i don't really understand whats wrong with elements in your case?!!, you may call as many elements as you wish from within your layout and .ctp files! on the other hand you can create a separate layout for each case you have and use { $this-layout } from your controller to render the proper layout

Jquery JSON Ajax Callback Not Working

2009-10-19 Thread hahmadi82
I'm trying to write a simple JSON post and the callback alert does not show up no matter what I do. I used firebugs to see if the post was getting any response and SHOE returns. So why is the alert not working in the callback? view code:

Design Pattern == Erroneous?

2009-10-19 Thread adam
Hey all, Curious about a design pattern I schemed up while daydreaming at work today. Instead of littering every controller with actions that are used for standard ajax requests(ajax_validate, ajax_save, etc), I thought up using an AjaxController, with no table, that has those standard actions.

Re: Regular Expression

2009-10-19 Thread adam
More elegant would be: /^[a-z]+$/i The i specifying that it is case-insensitive irc.freenode.net #regex is a better place for your question, btw On Oct 19, 2:26 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Right on, I ended up using 'rule' = array('custom', '/^[A-Za-z

How to do shipping address same as billing in Cake?

2009-10-19 Thread Tamim A.
Hi All, I am working on a project that requires one of those options where you check Shipping address is same as billing address and then the shipping form fields are automatically filled in. I've seen some Javascript functions out there that do the trick, but is there a 'proper' or preferred way

Re: How to do shipping address same as billing in Cake?

2009-10-19 Thread adam
Anything like that--a user interface feature--should be handled with JavaScript. Save the server-side for the server-side. On Oct 19, 10:06 pm, Tamim A. tmpan...@gmail.com wrote: Hi All, I am working on a project that requires one of those options where you check Shipping address is same as

Re: Design Pattern == Erroneous?

2009-10-19 Thread Amit
I might be oversimplifying but wouldn't a component accomplish this for you? On Oct 19, 8:23 pm, adam abennett...@sbcglobal.net wrote: Hey all, Curious about a design pattern I schemed up while daydreaming at work today.  Instead of littering every controller with actions that are used for

Re: Help with validation

2009-10-19 Thread John Andersen
Please show the code that delivers the input data to the model, so that we may be convinced that the data you receive from the form is also the data sent to the model for validation :) Also possibly the view code for the form. Enjoy, John On Oct 19, 5:15 pm, Dave Maharaj :: WidePixels.com