Re: How can I set a default value in DBDOFB?
| From: | Justin Patrin | Date: | Tue, 02 May 2006 17:52:05 +0000 |
| Subject: | Re: How can I set a default value in DBDOFB? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23911@lists.php.net to get a copy of this message | ||
On 5/2/06, Jose Manuel Zea <jmzeag@yahoo.es> wrote:
Hi all: I have a table where one of the fields it´s the link to another table: class DO_Subtiposinmueble extends DB_DataObject {The same way as with any HTML_QuickForm instance. Use setDefaults(). DBDOFB returns a normal HTML_QuickForm instance from getForm(). See the HTML_QuickForm docs. You can also do this in the postGenerateForm() callback (see FB docs). -- Justin Patrin###START_AUTOCODE/* the code below is auto generated do not remove the above tag */public $__table = 'subtiposinmueble'; // table namepublic $codsubtipo; // int(11) not_nullprimary_keypublic $nombre_es; // string(30)public $nombre_en; // string(30)public $numBusquedas; // int(11)public $codtipo; // int(11)/* Static get */function staticGet($k,$v=NULL) { returnDB_DataObject::staticGet('DO_Subtiposinmueble',$k,$v); }/* the code above is auto generated do not remove the tag below */###END_AUTOCODE} The field $codtipo it´s a field that I need to set the value when I get the form with DBDOFB. In the way that this value is sent to the database directly. How can I do it?