Re: After validation data is getting cleared

2010-04-12 Thread Ambika Kulkarni
Hi, I did the changes that you said. Still value field is empty. Thanks On Apr 9, 4:12 pm, Hani Sana sana8...@gmail.com wrote: In view :states add.ctp div class=states form ?php echo $form-create('State');?         fieldset                 legend?php __('Add State');?/legend        

Re: After validation data is getting cleared

2010-04-09 Thread Ambika Kulkarni
Hi Jeremy, I did the corrections for minlength and I put ?php debug($this- data);? code both in controller and view. When i submit the form with some empty fields, then error msg is displaying and in the controller i am getting the data but not in the view file. Ambika On Apr 9, 10:51 am,

Re: After validation data is getting cleared

2010-04-09 Thread Hani Sana
In view :states add.ctp div class=states form ?php echo $form-create('State');? fieldset legend?php __('Add State');?/legend ?php echo $form-input('abbr'); echo $form-input('name'); ? /fieldset ?php echo

After validation data is getting cleared

2010-04-08 Thread Ambika Kulkarni
Hi all, After validation the data from the filed is disappearing. How to restore the values of the field. I am using ?php e($form-text('name', array('class'= 'fullwidth'))); ? tag for creating fields. Thanks in advance Ambika Check out the new CakePHP Questions site http://cakeqs.org and help

Re: After validation data is getting cleared

2010-04-08 Thread John Andersen
Please provide more information: 1) What are you doing with the data in $this-data before and after validation? 2) Are you doing other processing of $this-data in beforeFilter function? 3) How does the data structure look like before validation and after? (use debug!) With the above we may better

Re: After validation data is getting cleared

2010-04-08 Thread Ambika Kulkarni
Hi John, In the model(user.php) I am doing the validation ?php class User extends AppModel { var $name = 'User'; var $validate = array( 'name' = array( 'rule' = array('minLenght', 1), 'required' = true, 'allowEmpty' = false, 'message' = 'Please enter a value for

Re: After validation data is getting cleared

2010-04-08 Thread Jeremy Burns
A few quick observations... Your 'minLenght' validation rules are spelt incorrectly. Should be 'minLength'. Try using code echo $this-Form-input('Model.fieldName', array('class' = 'fullwidth')); /code. Notice I use the model name as well. This ought to make your $form-error statements