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
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,
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
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
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
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
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