Re: CakePHP-3 Plugins form validation messages and field values

2015-02-23 Thread Gaurav Kumar
Lorenzo, I got the problem and the solution both. The problem was happening because of page reload. So now with the help of session i can fix that or I got modelless forms in cakephp which is also providing the solution. thanks for you help. On Monday, February 23, 2015 at 1:57:41 PM UTC+5:30,

Re: CakePHP-3 Plugins form validation messages and field values

2015-02-23 Thread José Lorenzo
Can you show the code you are using? Use gist.github.com to show your table class, controller and form code. On Thursday, February 19, 2015 at 7:19:22 AM UTC+1, Gaurav Kumar wrote: > > I have just created a CommentManager plugin. Created the comment form in > post's view.ctp file and able to add

CakePHP-3 Plugins form validation messages and field values

2015-02-19 Thread Gaurav Kumar
I have just created a CommentManager plugin. Created the comment form in post's view.ctp file and able to add the comments. But when the values of the comment form are wrong(email format is not proper or empty) then i am not getting the validation message in front of the respected fields and the

Re: Display Form Validation Errors CakePHP 3

2014-07-30 Thread José Lorenzo
Glad it worked :) On Wednesday, July 30, 2014 3:35:21 PM UTC+2, Jipson Thomas wrote: > > Hi Jose Lorenzo, > Thank you very much. Now it is working perfectly. > Regards, > Jipson > > On Wednesday, 30 July 2014 14:31:30 UTC+1, José Lorenzo wrote: >> >> Ok, you problem is that you are calling create(

Re: Display Form Validation Errors CakePHP 3

2014-07-30 Thread Jipson Thomas
Hi Jose Lorenzo, Thank you very much. Now it is working perfectly. Regards, Jipson On Wednesday, 30 July 2014 14:31:30 UTC+1, José Lorenzo wrote: > > Ok, you problem is that you are calling create() without the entity, You > should get that fixed by doing: > > Form->create($package) ?> > > On Wed

Re: Display Form Validation Errors CakePHP 3

2014-07-30 Thread José Lorenzo
Ok, you problem is that you are calling create() without the entity, You should get that fixed by doing: Form->create($package) ?> On Wednesday, July 30, 2014 3:29:33 PM UTC+2, Jipson Thomas wrote: > > Hi Jose Lorenzo, > Thank you for the reply. Please find the below code > > *CTP* > == >

Re: Display Form Validation Errors CakePHP 3

2014-07-30 Thread Jipson Thomas
Hi Jose Lorenzo, Thank you for the reply. Please find the below code *CTP* == Flash->render('auth') ?> Form->create() ?> Form->input('name', ['label' => 'Package Name']); ?> Form->input('annual_price', ['label' => 'Price / Year','type' => 'decimal']); ?>

Re: Display Form Validation Errors CakePHP 3

2014-07-30 Thread José Lorenzo
There does not seem to be any Form->create() call in that code you pasted. Can you share the full code? On Wednesday, July 30, 2014 3:20:54 PM UTC+2, Jipson Thomas wrote: > > Hi , > On my package creation form I am using cakephp validation. The validation > is working perfectly. Unfortunately th

Display Form Validation Errors CakePHP 3

2014-07-30 Thread Jipson Thomas
Hi , On my package creation form I am using cakephp validation. The validation is working perfectly. Unfortunately the validation error messages are not displaying on my form. Would you please help me on this? The code I am using is as follows. Please advise me what I am missing here. *My Table

Re: RESTful (Form) Validation?

2014-03-12 Thread OJ Tibi - @ojtibi
AD, I would just want to say that your reply was helpful! I'm now reading the details of crud/Error/CrudExceptionRenderer.php and crud/Error/Exception/CrudValidationException and I'll be taking cue from these. It also looks like the friendsofcake/crud plugin will be very useful to me someday

Re: RESTful (Form) Validation?

2014-03-12 Thread OJ Tibi - @ojtibi
Thanks, AD. I'll be reading the example today. Cheers, OJ On Wednesday, March 12, 2014 12:06:00 PM UTC+8, OJ Tibi - @ojtibi wrote: > > Hi folks, > > I was wondering if there was a way to let the client app know which fields > it submitted have validation errors. (As you can see, I placed "Form"

Re: RESTful (Form) Validation?

2014-03-12 Thread AD7six
I recommend taking a look at https://github.com/friendsofcake/crud, if not for the code (but why not =) ) for an example of how to do what you ask e.g. http://friendsofcake.com/crud/examples/blog.html#validation_errors curl -I -X POST http://your-site-domain.com/posts/add.json \ > -d title

RESTful (Form) Validation?

2014-03-11 Thread OJ Tibi - @ojtibi
Hi folks, I was wondering if there was a way to let the client app know which fields it submitted have validation errors. (As you can see, I placed "Form" between parentheses because there isn't really an HTML form in a REST API request.) While the Cookbook recommends to use the built-in Except

CakePHP 1.3: How to display form validation error messages when form is not tied to a model?

2013-11-01 Thread Stephen Tang
I have a view where I used FormHelper methods ($this->Form->input, etc.) to create a form (post), but this form is not tied to any model. It's a dumb form. For example, some fields are date fields. My controller will do some validation on these fields, but if there is a problem, how would I

Form validation multiple model errors

2013-05-15 Thread raymond . vanrijs
Hi, Got a client update form with a lot of client data split over 2 DB tables (so 2 CakePHP models). My form named 'Client' have fields like: Bedrijfsnaam *

Re: Form validation and business logic

2012-08-27 Thread Dr. Tarique Sani
> Please help me with my doubts of form validation, is form validation a part > of business logic? > if yes, then why we put this in Controller? You are not supposed put form validation logic in Controller - if you are doing it then it is wrong

Re: Form validation and business logic

2012-08-27 Thread Greg Skerman
Not sure I follow.. "form validation" is data validation - it rightly belongs in the model. The concept of "fat models" suggests that business logic should be pushed back closer to the business objects (i.e. put business logic in the model), and leave controllers

Form validation and business logic

2012-08-27 Thread sanjay.pal
Hi all, As per my knowledge, Business Logic is the part of Model in MVC architecture. Please help me with my doubts of form validation, is form validation a part of business logic? if yes, then why we put this in Controller? if no, then what is actually a business logic in a authentication

Form validation and business logic

2012-08-27 Thread Sanjay
Hi all, As per my knowledge, Business Logic is the part of Model in MVC architecture. Please help me with my doubts of form validation, is form validation a part of business logic? if yes, then why we put this in Controller? if no, then what is actually a business logic in a authentication

Form validation always fails - but there is no validation in the model.

2012-05-25 Thread Papa Gateau
Hi, I'm at my wits end on this one, so I'm hoping some of the great and good here can help me out. The client site is on cakePHP1.1 (and an upgrade is not on the cards for quite sometime). I have a very simple form which was always returning validation message (from the setFlash - see code snipp

CakePHP. Few form validation on same page

2012-04-14 Thread Scofield
Hello. My problem is that I can understand how can I validate few or more forms placed on the same page. What I have on the page: Code (controller): function signup() { > $this->User->set($thi

Re: Form validation error doesn't show! CPHP 1.3

2011-12-28 Thread Ersin Demirtas
I found the solution :D, just update the required fields. $this->_refreshAuth('username',$this->data['User']['username']); -- 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

Re: Form validation error doesn't show! CPHP 1.3

2011-12-28 Thread Ersin Demirtas
OK, I found the problem I was using this function some how this function disables errors. please help.. function _refreshAuth($field = '', $value = '') { if (!empty($field) && !empty($value)) { $this->Session->write($this->Auth->sessionKey .'.'. $field,

Form validation error doesn't show! CPHP 1.3

2011-12-28 Thread Ersin Demirtas
Form validation error doesn't show! CPHP 1.3 I have a user model and in my user model i have User Model array( 'usernameRule' => array( 'rule' => 'alphaNumeric',

Re: RE: CakePHP Form Validation Errors -- no luck???

2011-07-23 Thread KingInky
Hey, thank you! You were completely right. I'm feeling a little dumb right now :] -- 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 unsu

Re: RE: CakePHP Form Validation Errors -- no luck???

2011-07-23 Thread Tilen Majerle
i think, filename should be user.php not user_model.php :) -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/7/23 KingInky > I have had no luck figuring this out. Still seeking answers. Thank you all. > > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.

Re: RE: CakePHP Form Validation Errors -- no luck???

2011-07-23 Thread KingInky
I have had no luck figuring this out. Still seeking answers. Thank you all. -- 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

Re: RE: CakePHP Form Validation Errors -- no luck???

2011-07-22 Thread KingInky
Sure. The model (user_model.php): http://pastebin.com/RdaEfnCn The controller (users_controller.php): http://pastebin.com/4pfbWZKE The view (register.ctp): http://pastebin.com/aTjTya6z Thanks again for your help. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.o

RE: CakePHP Form Validation Errors -- no luck???

2011-07-22 Thread Meroe Kush
Please pastebin your model, view, and controller. -Original Message- From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of KingInky Sent: Friday, July 22, 2011 6:42 PM To: CakePHP Subject: CakePHP Form Validation Errors -- no luck??? Hello, I'm a Ca

CakePHP Form Validation Errors -- no luck???

2011-07-22 Thread KingInky
Hello, I'm a CakePHP amateur. I've converted a clients Wordpress into a CakePHP website (or have been trying to, at least). I just started doing his registration form. For whatever reason, it is NOT validating any of the rules I've setup in my model. I've had people in the CakePHP IRC look at and

Re: Security form validation: is there a log somewhere?

2011-07-13 Thread DragonFlyEye
Thank you for this information. Basically, I should just not count on CSRF protection in AJAX, which I get. I'm assuming I must be making some change to the form in question via AJAX, I guess I'll have to turn off the validation. -- Our newest site for the community: CakePHP Video Tutorials h

Re: Security form validation: is there a log somewhere?

2011-07-12 Thread Jens Dittrich
As long as you are overriding the naming with the help of the form helper you should not encouter problems. If you make changes with JavaScript on the clientside or load option lists (for example) via AJAX then the security component will stop you. That is mostly because of its CSRF protection t

Security form validation: is there a log somewhere?

2011-07-12 Thread DragonFlyEye
I've finally figure out that CakePHP's Security Component will validate form fields, dumping the user out on a 404 if anything is wrong. Great, but now the question is: what is wrong? According to the documentation, the form should be setup via the Form Helper. It is. But other than that, no gu

Re: Form Validation

2011-04-28 Thread Walther
t: if ($this->ModelName->validates()) {// it validated logic} else {// didn't validate logic} On Apr 29, 4:31 am, Sanfly wrote: > Hi > > My cake version is 1.3.7 > > I'm just learning form validation and am having a few issues. > > Firstly, the manual is cra

Re: Form Validation

2011-04-28 Thread Tilen Majerle
Before you call $this->User->validates() you must the data to model...do this $this->User->set($this->data) On Apr 29, 2011 4:31 AM, "Sanfly" wrote: Hi My cake version is 1.3.7 I'm just learning form validation and am having a few issues. Firstly, the manual i

Form Validation

2011-04-28 Thread Sanfly
Hi My cake version is 1.3.7 I'm just learning form validation and am having a few issues. Firstly, the manual is crap in that it doesn't tell you how to implement the validation in your model, and it doesn't tell you how to show the validation error messages in your view. Took a

Re: Form Validation with more than one model

2011-03-21 Thread Jeremy Burns | Class Outfit
What I understood from your original post was that you wanted to store the users address in more than one model, i.e. the same data in multiple places, as opposed to storing the data once in one place and creating references to it from other places. Forgive me if I misunderstood. Jeremy Burns C

Re: Form Validation with more than one model

2011-03-21 Thread duderion
what do you mean with 'but it isn't storing the same data multiple times' ? On 15 Mrz., 05:49, Jeremy Burns | Class Outfit wrote: > Yes, this takes your data array and stores parts of it in different models, > but it isn't storing the same data multiple times. That's an admin nightmare, > so as

Re: Form Validation with more than one model

2011-03-14 Thread Jeremy Burns | Class Outfit
Yes, this takes your data array and stores parts of it in different models, but it isn't storing the same data multiple times. That's an admin nightmare, so as I mentioned before, the best solution is to examine your database design. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://

Re: Form Validation with more than one model

2011-03-14 Thread Jeremy Burns | Class Outfit
Design your database better so it's only stored once. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 14 Mar 2011, at 23:36, duderion wrote: > hi guys, > > i have a users/add form, and i want to store the users address data to > several models (adresses,acco

Re: Form Validation with more than one model

2011-03-14 Thread duderion
i found a cool solution :D http://nuts-and-bolts-of-cakephp.com/2008/08/01/practical-use-of-saveall-part-1-working-with-multiple-models/ greets duderion On Mar 15, 12:36 am, duderion wrote: > hi guys, > > i have a users/add form, and i want to store the users address data to > several models (a

Form Validation with more than one model

2011-03-14 Thread duderion
hi guys, i have a users/add form, and i want to store the users address data to several models (adresses,accounts, etc) so i have more than one model to validate. whats the best practice ? duderion -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out

Re: CakePHP form validation before sending post to the requested controller function

2011-02-27 Thread kdubya
Oops, I neglected to say the your create() needs to change: echo $this->Form->create('Plan', array('action' => 'search_form')); instead of: echo $this->Form->create('Plan', array('action' => 'search')); On Feb 26, 2:01 pm, kdubya wrote: > So, in your search() action, call the validates() method

Re: CakePHP form validation before sending post to the requested controller function

2011-02-27 Thread kdubya
Sorry, you are absolutely right, redirecting causes the validation error messages to be lost. So, reverse the logic. You currently have a view that renders the form that collects the search criteria (you don't say what this is but I'll call it search_form as I did above). So there is an action and

Re: CakePHP form validation before sending post to the requested controller function

2011-02-26 Thread OldWest
I solved the issue by using implode(), but my errors are no longer displaying below my form fields. Errors are displaying in the default layout... Hmmm.. Anyhow here is my working code: ...else { $errors = $this->Plan->invalidFields(); $error_messages = implode(' ',$errors); $this->Session

Re: CakePHP form validation before sending post to the requested controller function

2011-02-26 Thread OldWest
kdubya, I've already tried that several times. The error *never* displays *because *of the redirect. I am trying to work it into a session, but no luck yet : ( else { //$errors = $this->Plan->invalidFields(); //$this->Plan->validates(); $errors = $this->Plan->invalidFields(); debug($err

Re: CakePHP form validation before sending post to the requested controller function

2011-02-26 Thread kdubya
So, in your search() action, call the validates() method as show in the book here: http://book.cakephp.org/view/3/The-Manual#!/view/410/Validating-Data-from-the-Controller Something like: if ($this->Plan->validates()) { // continue to show your search results view } else { // didn'

Re: CakePHP form validation before sending post to the requested controller function

2011-02-26 Thread OldWest
Hi Stephen, I don't have a *search *controller. My *search()* action is in my *Plan * controller. The validation works, but naturally directs to the* plan/search(.ctp)* view file which of course displays 0 results, but the validation message appears just fine. I just don't want the *search.ctp*

Re: CakePHP form validation before sending post to the requested controller function

2011-02-26 Thread Stephen
Use custom routing to change /plans/search to /search If that is the reason? On 26 February 2011 11:15, Stephen wrote: > Why do you have a search controller? > > Have a search action in the PlansController, as I assume you are searching > for plans. > > You don't need to call the form from the

Re: CakePHP form validation before sending post to the requested controller function

2011-02-26 Thread Stephen
Why do you have a search controller? Have a search action in the PlansController, as I assume you are searching for plans. You don't need to call the form from the search action, you can call it from anywhere and it will validate - if it doesn't validate, redirect to the referer? a Plan is an Ob

CakePHP form validation before sending post to the requested controller function

2011-02-25 Thread OldWest
My validation is working as it stands, but I want to display the validation error prior to the search controller. I understand this might not be possible within the CakePHP framework. I have a model *plan.php*. And in the *plans_controller.php*, I have a function called *search()*. My form c

Re: Universal search form validation using a fake model

2011-01-29 Thread cricket
> vehicles/index - list all vehicles for the past 2 weeks > vehicles/search - list only the vehicles based off the form in the > search view, but should display the records in the vehicle.index view > > Search form Validation: > Doors can be no more than 4 and must be a positive num

Universal search form validation using a fake model

2011-01-29 Thread digitalw00t
vehicles based off the form in the search view, but should display the records in the vehicle.index view Search form Validation: Doors can be no more than 4 and must be a positive number Wheels cannot be greater than 16 but must be a positive number Customer must have at least 4 characters My initial

Video : Ajax Form Validation in CakePHP 1.3 using Jquery

2011-01-21 Thread Azril Nazli
Ever try to simulate $ajax->observeField() in Cake using Jquery, the following video shows you how URL : http://www.php.net.my/forum/video-cakephp-validation-jquery - the video has no audio so you need to pay attention to whatever I typed - recorded using CamStudio in AVI and later converted to F

Re: Form Validation does not work on Cake 1.3.6

2011-01-20 Thread Gaetan Allart
soft.com > > > > On Wed, Jan 19, 2011 at 5:38 AM, Kh3ops wrote: > >> Actually, I baked my application and form validation is working fine >> now. >> >> As far as $this is concerned. I would love to use it but it doesn't >> work : "call

Re: Form Validation does not work on Cake 1.3.6

2011-01-19 Thread Amit Badkas
> > Amit Badkas > > > > PHP Applications for E-Biz:http://www.sanisoft.com > > > > On Mon, Jan 10, 2011 at 6:38 AM, Kh3ops wrote: > > > Hi, > > > > > I installed cake 1.3.6 on PHP 5.3.3. > > > > > I've just run through

Re: Form Validation does not work on Cake 1.3.6

2011-01-18 Thread Kh3ops
Actually, I baked my application and form validation is working fine now. As far as $this is concerned. I would love to use it but it doesn't work : "call to a member of a non-object"... Gaëtan On 11 jan, 05:03, Amit Badkas wrote: > Hi, > > Your description of the v

Re: Form Validation does not work on Cake 1.3.6

2011-01-10 Thread Amit Badkas
tions for E-Biz: http://www.sanisoft.com On Mon, Jan 10, 2011 at 6:38 AM, Kh3ops wrote: > Hi, > > I installed cake 1.3.6 on PHP 5.3.3. > > I've just run through the "blog tutorial" and everything's working > fine except "form validation". > For a

Form Validation does not work on Cake 1.3.6

2011-01-10 Thread Kh3ops
Hi, I installed cake 1.3.6 on PHP 5.3.3. I've just run through the "blog tutorial" and everything's working fine except "form validation". For an unknown reason, validating an empty form works and databases is filled with empty records. Here is what I used in m

Re: Form validation and routes - errors lead to controller/action instead of route!

2010-11-30 Thread DigitalDude
Hey, ok I found the solution, and it's really simple. Just use the 'url' option for the form, and the routes will be no problem anymore. Here is a brief example how to do it: In Routes-PHP, there is an entry: Router::connect('/register', array('controller' => 'users', 'action' => 'register'));

Form validation and routes - errors lead to controller/action instead of route!

2010-11-30 Thread DigitalDude
is working, and very easy to set up. But when I now make any mistake in the form given in the register action, the url in the browser switches back to users/register, which is the correct action, but not the correct route! I could do a redirect when an error occurs, but the form validation errors (by m

Re: Form validation errors

2010-09-18 Thread Dr. Loboto
In this case better turn off persistentModel as you did and reopen ticket. Looks like it is definitely CakePHP bug. On Sep 17, 6:09 pm, Jeremy Burns | Class Outfit wrote: > Thanks Dr Loboto. Unfortunately that has no effect. > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://ww

Re: Form validation errors

2010-09-17 Thread Jeremy Burns | Class Outfit
Thanks Dr Loboto. Unfortunately that has no effect. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 17 Sep 2010, at 11:56, Dr. Loboto wrote: > What if you call create() on this model before save()? Checked code > related to $persistModel and get lost there. >

Re: Form validation errors

2010-09-17 Thread Dr. Loboto
What if you call create() on this model before save()? Checked code related to $persistModel and get lost there. On Sep 17, 1:21 pm, Jeremy Burns | Class Outfit wrote: > I have *really* solved it now. In my app_controller I had var $persistModel = > true; which I was lead to believe was a *good

Re: Form validation errors

2010-09-16 Thread Jeremy Burns | Class Outfit
I have *really* solved it now. In my app_controller I had var $persistModel = true; which I was lead to believe was a *good thing* from a performance point of view. If I comment out that line my problem disappears and I reliably get validation messages on screen. Before I leave this, can anyone

Re: Form validation errors

2010-09-16 Thread Jeremy Burns | Class Outfit
I jumped the gun. After I cleared the cache I resubmitted the form and got the validation error messages. Deep joy. I closed the ticket and told the world my problem was solved. Then I resubmitted the form again - and no validation messages. This is repeatable: clear the cache, submit the form,

Re: Form validation errors

2010-09-16 Thread Jeremy Burns | Class Outfit
OK - frustration over. I cleared the cache and ran it again, and all works as expected. Very bizarre though, considering I started with an empty cache and have cleared it many times during this debug process. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 1

Re: Form validation errors

2010-09-16 Thread Jeremy Burns | Class Outfit
Thanks. Here's my findings from the test site. get_class($this->Order->OrderItem->OrderAddress) returns 'OrderAddress', so the model is loaded. I have littered debug statements throughout and the code is not erroring before or after the saves; the saves are happening and failing, producing vali

Re: Form validation errors

2010-09-16 Thread Dr. Loboto
Output get_class($this->MyModelThatDontValidate) or call custom model method to check that models are really loaded. Also check that you approach save() or validates() call in controller and don't get error before that abandon save/validation. Be sure that debug > 0. In most of cases such errors ha

Re: Form validation errors

2010-09-16 Thread Jeremy Burns | Class Outfit
Nope, not correct. All models named correctly - and don't forget exactly this same code works on my Mac. If your theory was right then I'd be getting all sorts of errors and the forms wouldn't pull any data at all. In my case, $this->validationErrors is empty. Jeremy Burns Class Outfit jeremyb

Re: Form validation errors

2010-09-16 Thread Dr. Loboto
99.9% - your models are not loaded at all because you named them not in lowercase. On 16 сен, 20:52, Jeremy Burns wrote: > I'm a bit stumped. I've developed some code on my local machine (MAMP) > and when a form fails validation I get the right error messages > displayed in the right places. I ha

Form validation errors

2010-09-16 Thread Jeremy Burns
I'm a bit stumped. I've developed some code on my local machine (MAMP) and when a form fails validation I get the right error messages displayed in the right places. I have used the form helper to create the form and the inputs, but have not used any code to produce the error messages - I am leavin

Re: Javascript form validation in cakephp 1.3.0

2010-05-18 Thread Nandan Jana
rd' WHICH IS NOT THE FILED FOR THE TABLE. I DONT WANT TO MAKE THESE TWO INPUTS VALIDATION IN THE CONTROLLER manually. I WANT TO WRITE IT IN THE MODEL CLASS. SO THAT I CAN USE THE RULES WHEN I use validates() OR WHEN I USE JAVASCRIPT AUTOMAGIC VALIDATION. IF IT POSSIBLE THEN I JU

Re: Javascript form validation in cakephp 1.3.0

2010-05-16 Thread Nandan Jana
Hi, I have fixed it. and properly installed the plugins. and i am trying to use it for some simple form validation.. thanks for the help.. On May 17, 10:20 am, Nandan Jana wrote: > Hi, > > I study the linkhttp://github.com/mcurry/js_validate > > and try to

Re: Javascript form validation in cakephp 1.3.0

2010-05-16 Thread Nandan Jana
Hi, I study the link http://github.com/mcurry/js_validate and try to use this plugin and got this error Warning (512): Method ValidationHelper::rules does not exist [CORE/ cake/libs/view/helper.php, line 161] i am using cake 1.3.0 version... Thanks On May 17, 9:49 am, Walther wrote: > Who ar

Re: Javascript form validation in cakephp 1.3.0

2010-05-16 Thread Nandan Jana
Hi, I study the link http://github.com/mcurry/js_validate and try to use this plugin and got this error Warning (512): Method ValidationHelper::rules does not exist [CORE/ cake/libs/view/helper.php, line 161] i am using cake 1.3.0 version... Thanks On May 17, 9:49 am, Walther wrote: > Who ar

Re: Javascript form validation in cakephp 1.3.0

2010-05-16 Thread Nandan Jana
Hi, I study the link http://github.com/mcurry/js_validate and try to use this plugin and got this error Warning (512): Method ValidationHelper::rules does not exist [CORE/ cake/libs/view/helper.php, line 161] i am using cake 1.3.0 version... Thanks On May 17, 9:49 am, Walther wrote: > Who ar

Re: Javascript form validation in cakephp 1.3.0

2010-05-16 Thread Walther
Who are you, and why are you talking about facets? On May 16, 2:51 pm, floridapastor wrote: > I am aware and talking about the FACETS. You should check it out on google > and please reply. pastor > > On Sun, May 16, 2010 at 3:05 AM, Walther wrote: > > You know, there is this wonderful little too

Re: Javascript form validation in cakephp 1.3.0

2010-05-16 Thread floridapastor
I am aware and talking about the FACETS. You should check it out on google and please reply. pastor On Sun, May 16, 2010 at 3:05 AM, Walther wrote: > You know, there is this wonderful little tool available called 'Google > Search' use it. > > http://tinyurl.com/33mcrqb > > http://github.com/mcur

Re: Javascript form validation in cakephp 1.3.0

2010-05-16 Thread Walther
You know, there is this wonderful little tool available called 'Google Search' use it. http://tinyurl.com/33mcrqb http://github.com/mcurry/js_validate http://sandbox2.pseudocoder.com/demo/validation On May 15, 9:24 am, Nandan Jana wrote: > Please can any one reply. > > is it possible to validat

Re: Javascript form validation in cakephp 1.3.0

2010-05-15 Thread Nandan Jana
Please can any one reply. is it possible to validate a form by javascript in cake 1.3.0 . i have used validation rules in model, but want a client side checking??? On May 14, 4:47 pm, Nandan Jana wrote: > Hi, > >       I am a php developer and i never use a frame work. Nowaday's > frame work is

Re: Javascript form validation in cakephp 1.3.0

2010-05-15 Thread Nandan Jana
Please can any one reply. is it possible to validate a form by javascript in cake 1.3.0 . i have used validation rules in model, but want a client side checking??? On May 14, 4:47 pm, Nandan Jana wrote: > Hi, > >       I am a php developer and i never use a frame work. Nowaday's > frame work is

Javascript form validation in cakephp 1.3.0

2010-05-14 Thread Nandan Jana
Hi, I am a php developer and i never use a frame work. Nowaday's frame work is must . so i search a lot in google and decided to use CAKEPHP. I am using the latest stable version 1.3.0 , Try to develope a admin panel first and i have learned a lot about model, controller, layout, elem

Re: redirect to anchor link for form validation

2010-03-20 Thread cricket
To include anchor in a URL, provide the id with the '#' key in the URL. If your anchor ID is 'foo', you'd use something like: 'controller' => 'xxx', 'action' => 'yyy', '#' => 'foo' ... in the form action. You need to specify it there, and not in a controller redirect, because the page is not relo

redirect to anchor link for form validation

2010-03-19 Thread Johnny Ferguson
Hi, I've successfully set up a contact form in cakePHP, and when validation rules in my model don't pass, the form is reloaded with all my validation errors displayed properly. That battle was won :) Now for the tricky part. Can anyone think of a way to not only have the form page reload with er

ajax->submit and form validation

2009-11-30 Thread manojsharma
Hi all, i am new to cakephp. i have created an application have two functionality on single form. i am using cake 1.2.5. here is my application: i have customer form. this form contains bellow fields, 1. input box customer name 2. input box customer account no and form for insterting address 3.

Form validation using multiple Models?

2009-11-28 Thread spheroid
I have a form I'm calling via a specific controller, but will save to multiple tables. Is there a way to validate against multiple models? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are su

Re: Cake PHP Form validation

2009-11-18 Thread jburns
I'm not entirely sure of all the differences, but what I am learning is it is best to go "as-Cake-as-possible" to get everything to tie together. It's worth persevering until you find the solution. One thing I do know is that if you use $form->input everything is wrapped up in a div. If you use $fo

Re: Cake PHP Form validation

2009-11-18 Thread E T
Wow, amazing!! You are a genius.. hehe thank you so much. It is working now, and yes you are right, I forgot to make changes in the view. BTW, just one curious question.. so to create input fields in form, it is better to use '$form->input' rather than something like '$form->password' ? What is t

Re: Cake PHP Form validation

2009-11-18 Thread jburns
First, change the inputs in the view to: echo $form->input('password1', array('label'=>'Password')); echo $form->input('password2', array('label'=>'Please confirm your password')); See what happens then. On Nov 18, 2:57 pm, E T wrote: > Hi jburns, > > Thanks a lot for the reply. I've tried addi

Re: Cake PHP Form validation

2009-11-18 Thread E T
Hi jburns, Thanks a lot for the reply. I've tried adding your code but it's still not working. This is what happened: - if name, email or username is empty, it will give an error message, something like "Alphabets and numbers only" or "This field cannot be left blank". However, there is no error

Re: Cake PHP Form validation

2009-11-18 Thread jburns
I forgot something...you need to clear out the password1 and password2 fields before saving. Use this: function beforeSave() { if (isset($this->data['User']['password1'])): $this->data['User']['password'] = Security::hash($this->data ['User']['password1'],

Re: Cake PHP Form validation

2009-11-18 Thread jburns
First, a general point. Rather than having separate entries for label and the input, try: echo $form->input('xxx', array('label'=>'Xxxx')); (where xxx is the name of your field and Xxxx is your label). This works for me when confirming that passwords match: 'password1'=>array(

Cake PHP Form validation

2009-11-18 Thread Code Buzz
Hi all, I'm a newbie at cakePHP, and still at the learning phase. I was trying to make a user management system with cakephp, where we can add/edit/delete user. But I am stuck in the validation part. I hope someone can help me on this. I have this 'users' table: = CREATE

Re: Form Validation - Problems with Umlauts and Passwords

2009-07-08 Thread Robert P
1. Before rendering the view it's a good idea to unset any sensitive information in Controller::$data. This way, the form will get to display the errors and the password fields will stay empty. 2. The error comes from the call to: FormHelper::error() => h() => htmlspecialchars($this->val

Form Validation - Problems with Umlauts and Passwords

2009-07-08 Thread Taff
I'm rather new to cakePHP and am experimenting with it, in the hope that it will be the framework I will use for a multilingual site I have been tasked with. The site will be available in German and English. Problem 1: When the form doesn't validate correctly it is reloaded with the password alre

Re: Form Validation: Opposite of EqualTo (NotEqualTo, Does Not Equal)

2009-07-04 Thread jperras
http://book.cakephp.org/view/139/comparison -j. On Jul 2, 5:13 pm, hoyos wrote: > Hey, > > Simple question, is there a built-in form validation function to > validate that a field DOES NOT EQUAL a certain value? > > For example: 'password' => array( 'rule

RE: Form Validation: Opposite of EqualTo (NotEqualTo, Does Not Equal)

2009-07-02 Thread Paul
Subject: Form Validation: Opposite of EqualTo (NotEqualTo, Does Not Equal) Hey, Simple question, is there a built-in form validation function to validate that a field DOES NOT EQUAL a certain value? For example: 'password' => array( 'rule' => array('notEqualTo', &#

Form Validation: Opposite of EqualTo (NotEqualTo, Does Not Equal)

2009-07-02 Thread hoyos
Hey, Simple question, is there a built-in form validation function to validate that a field DOES NOT EQUAL a certain value? For example: 'password' => array( 'rule' => array('notEqualTo', 'password'), 'message'=

Re: form validation using model

2009-06-19 Thread Marcelo Andrade
On Thu, Jun 18, 2009 at 12:21 AM, puneetratan wrote: > (..) > > and one more thing, that when i use $form->input then validations > appears but when i use $form->text then validations does not appear, I see you solved it. But just for reference, $form->text doesn't provide validation messages.

  1   2   3   >