TaFfin Posted May 28, 2003 Posted May 28, 2003 Can't figure it out.... How do I let the admincategories.php page show the default value of a database field? In MySQL (phpMyAdmin) you can give a default value to a database field, but when inserting a new product, the default is not shown. Does anybody know how to do this? Thanx, TaFfin SIGnificant.....right?
TaFfin Posted June 2, 2003 Author Posted June 2, 2003 I'd just like to show a standard value. Let's say a productnumber always starts with '1234', and only the last three digits need to be filled in. It's handy when those '1234' are already present. It works as a reminder and helps speeding up the proces of adding of new products. Once again, MySQL has the ability to show default values, I just don't know how to show them in osCommerce fields. Thanx, TaFfin SIGnificant.....right?
guntersammet Posted June 2, 2003 Posted June 2, 2003 You need to change the code for that. You have a couple of options for that: -Use JavaScript to enter the value and JavaScript to jump to the end of the inserted text on focus (IIRC, this is possible. But not 100% sure. Didn't check). -Define the default value as a PHP variable and insert it into the form. Use JavaScript to jump to the end of the form. If you need some help with the code, let us know where you want what and somebody should be able to help you. HTH Gunter
Recommended Posts
Archived
This topic is now archived and is closed to further replies.