I'm currently using CakePHP 1.2 beta.  I already know that you can do
something like the following in order to provide a default INPUT
value:

$form->input('User.name', array('type'=>'text', 'value'=>'Beavis'));

The problem is that I only want this default value to display when the
page is first being loaded (i.e.: during a GET that is not the result
of a form submission).  Currently, when the user submits the form
submits, I want the page to display the second time with whatever
value the user entered (i.e.: Controller::$data['User']['name']).
Currently, the value "Beavis" is always put into the textbox, even
after the form is submitted with a different value.

How can I display a default value when a form IS NOT submitted, and
the user's value when a form IS submitted.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to