Saturday, January 30, 2010

Weird problem with form that doesn't use model

Hi everyone, I'm experiencing extreme frustration with this problem!
Luckily, it's easy to reproduce.

In any controller, create this method;

function test() {
debug($this->data);
}

Then create a corresponding view called 'test';

<?php
echo $form->create(false,array('action'=>'test'));
echo $form->input('address');
echo $form->end('Submit');
?>

You'll note that the form is created WITHOUT a model.

When I enter something into the field, however, the page returns with
ONLY THE FIRST character populated in the field! E.g., if I enter '123
smith st', when it reloads it only say '1'.

Examining $this->data, I can see that the whole string is being
passed. Can anyone help?

P.S. there's a good reason I'm not using the model.

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 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: