loading fixtures to a different test datasource
Hi, I have 2 datasources defined $test and $test_new in my database.php file. In my fixture files I need the table 'x_new' to be loaded in $test_new datasource, to accomplish this, with in the fixture file of the table 'x_new' I specified var $useDbConfig = 'new'; (since cakePHP automatically substitues 'test_' as a prefix) But, when I run the test case, this table is always created in the datasource defined for $test I tried cakephp manual to search for answers, but did not find any. I am using cakePHP 1.3 Could somebody point out what is the step I am missing here or is there an error in what I am doing? Please reply. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
AJAX callback function "complete" - how to access the XMLHttpRequest response text?
I see that this question was asked before in this group, but I do not see any answers for it? Could somebody help me how to do this? I want the response from the controller function to be passed to call back function . -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Moving TinyMCE into vendors folder...Need Help.....
Hi, when TinyMCE was placed inside webroot/js folder, everything worked fine. But when i placed it inside vendor folder (more apps can use it) TinyMCE run and display their window in place of textarea, but icons don't load. When I move the mouse over, button gets highlighted but icons are not displayed. Is there some way how to put TinyMCE into vendor folder with 100% functionality? Thanks for tips --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Need help with ACL
I am implementing ACL for an existing site. There is a view file , the name of the view file is edit.ctp it is under the folder acl_aros. This view file contains a single text box, and this value is used for the 'alias' column in 'aros' table. The name of the controller that has the 'save' function is acl_aros_controller.php The name of the model file in which I have written the validation for the field is 'acl_aro.php'. The validation says the text field cannot be empty and has to be min. of 4 char. But the problem here is data's are getting inserted, but it never uses the validation in the model file. In simple words, it doesn't uses that model file at all. If I submit a form with empty text box, an empty record is getting inserted. What am I missing here? How should I tell the system to use this model file so that validation check is done. Please help me with this. --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to make use of the error method for one controller with different modules
My scenario is : Keep for example there is a view file and it has 2 input fields for entering name. First field belong to model_1 which is the primary model of the view page. Second field belongs to another model model_2. Both fields are mandatory and has an error msg. if left blank. If I use $this->model->invalidFields() in my controller, I am getting the errors as an array. --> No issues here. But when I try to use $form->error(...) function, errors get displayed for the first field which belongs to the primary model but for the second field though I leave it blank no error msg. are getting displayed. I understand we have to tell cakePHP that second field belongs to another model, So I declared it in following way: echo $form->input('model_2.NAME', array('class' => 'input_edit')); echo $form->error('model_2.NAME', 'error msg'); What is wrong with the above? Am I not addressing something here? Please help me to solve this issue. --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to use $form->error
My scenario is : Keep for example there is a view file and it has 2 input fields for entering name. First field belong to model_1 which is the primary model of the view page. Second field belongs to another model model_2. Both fields are mandatory and has an error msg. if left blank. If I use $this->model->invalidFields() in my controller, I am getting the errors as an array. --> No issues here. But when I try to use $form->error(...) function, errors get displayed for the first field which belongs to the primary model but for the second field though I leave it blank no error msg. are getting displayed. I understand we have to tell cakePHP that second field belongs to another model, So I declared it in following way: echo $form->input('model_2.NAME', array('class' => 'input_edit')); echo $form->error('model_2.NAME', 'error msg'); What is wrong with the above? Am I not addressing something here? Please help me to solve this issue. --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Single controller file to access multiple model files
Hi Friends My scenario is : I have a single controller file, lets keep its name as conditions_controller.php. This controller file saves the details that are submitted from a form. But the form details needs to be saved in 3 different table. The thing here is I am saving it in 3 different tables. But when it comes to validation it becomes a problem for me. Lets keep in the form i have 6 fields. The validation of first 2 fields is done in condition.php (primary model) The validation of second 2 fields is done in condition_two.php (different model file becoz it is for a diff. table) The validation of third 2 fields is done in condition_three.php ( different model file becoz it is for a diff. table) The validation for first 2 fields happen, msg. gets displayed if user does not fill in the form. But for the other two tables, the validation messages do not get displayed. Though the fields are set as mandatory, even when user submits a form without entering those fields the form is getting submitted. Now I want to display the validation msgs. from the other 2 model files too... How to achieve this? I read something abt $uses array... but I don't understand as to how to put it to my use? Please help me in solving this problem. Thanks in advance. --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to display 'star symbol' next to a input box
Hi Friends My problem is.. I have a input box with an image tag following it echo $form->input('NAME', array('class' => 'input_edit', 'label' => 'Name', 'type' => 'text', 'value' => ''])); echo $html->image('star.jpg', array('title' => 'hai')); As the input box is wrapped inside a tag, the star symbol is getting displayed in the next line. What should I do, so that the star symbol gets displayed next to the textbox. Please give me a simple solution. Thanks in Advance --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to capture value from the drop down list
I have a drop down list consisting of 'status' values. Each city has its own id and and a set of colors for it. Below is my requirement : 1. If a user selects a 'status' value from the drop down, I have to ask the user "if he/she is confirmed with the selected status". 2. If 'no' nothing should happen 3. If "yes", I should get the values of colors associated with that particular status. 4. All the above should happen WITHOUT reloading the page. color values are stored in mysql database. How to acheive this using cakePHP? Please help me in this. --~--~-~--~~~---~--~~ 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 unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---