Re: default values in form fields

2006-05-12 Thread David Spitzley
>>> [EMAIL PROTECTED] 05/12/06 5:46 AM >>> if you set in $this->data['Model']['field'] then the html helper will add the value to the field you can use $html->tagValue('Model/field'); if you need the default data for something else. so in your add form for example function add() { if(

Re: default values in form fields

2006-05-12 Thread gwoo
if you set in $this->data['Model']['field'] then the html helper will add the value to the field you can use $html->tagValue('Model/field'); if you need the default data for something else. so in your add form for example function add() { if(empty($this->data) {

default values in form fields

2006-05-11 Thread calzone
Can't seem to find anything on setting default values for form elements. Outside of selectTag, that is. But if I wanted to have a default value for a text input, textarea or checkbox, is that possible? And would this be the kind of thing that gets managed in the model, sort of like validation,