View Full Version : Defaulting to database value on product update
Travis250923
03-17-2009, 10:46 AM
How can I get the product update page to display the value already in the database? Right now it comes up as blank and when submitted wipes out the thumbnail information. Here is what I have the value set to on the upload file field.
<?php echo(str_replace('"', '"', $row_WADAitems['ItemThumb'])); ?>
Ray Borduin
03-17-2009, 02:21 PM
Are you trying to do this in a file input field? If so, it isn't possible. the code you have should work to display the information on the page.
Travis250923
03-17-2009, 02:58 PM
So since this is a file field for an image update there is no way to default to what currently exists and someone will always have to re-upload the image? I suppose I could remove the image updates from this page and add a separate page for only updating the picture.
Ray Borduin
03-18-2009, 07:55 AM
No, just set the default value in the upload server behavior to be the value from the recordset. This way if nothing is uploaded it will use the current value from the database.
Travis250923
03-18-2009, 08:43 AM
Perfect solution thanks
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.