so I have a form that be used to update existing carriers and one of the fields is to allow to upload an image associated with that carrier - is there a way to populate that input field with the existing file name? this is maybe only the 2nd time ever that I've needed a file upload thingy so I'm not even sure how to google for the answer on my own
PHP Code:
<?php
$page->contentSet('
<form action="" method="post" enctype="multipart/form-data">
<p>
Carrier ID: '.$getCarrier['viewCarrierRow']['id'].'<br />
<label for="name">Name<span class="required">*</span>: </label>
<input type="text" name="name" id="name" size="30" value="'.$getCarrier['viewCarrierRow']['name'].'" />
</p>
<p>
<label for="address1">Address 1<span class="required">*</span>: </label>
<input type="text" name="address1" id="address1" size="30" value="'.$getCarrier['viewCarrierRow']['address1'].'" />
</p>
<p>
<label for="address2">Address 2: </label>
<input type="text" name="address2" id="address2" size="30" value="'.$getCarrier['viewCarrierRow']['address2'].'" />
</p>
<p>
<label for="city">City<span class="required">*</span>: </label>
<input type="text" name="city" id="city" size="30" value="'.$getCarrier['viewCarrierRow']['city'].'" />
</p>
<p>
<label for="state">State<span class="required">*</span>: </label>
<input type="text" name="state" id="state" size="5" value="'.$getCarrier['viewCarrierRow']['state'].'" />
</p>
<p>
<label for="zip">Zip<span class="required">*</span>: </label>
<input type="text" name="zip" id="zip" size="10" value="'.$getCarrier['viewCarrierRow']['zip'].'" />
</p>
<p>
<label for="phone">Phone<span class="required">*</span>: </label>
<input type="text" name="phone" id="phone" size="30" value="'.$getCarrier['viewCarrierRow']['phone'].'" />
</p>
<p>
<label for="fax">Fax: </label>
<input type="text" name="fax" id="fax" size="30" value="'.$getCarrier['viewCarrierRow']['fax'].'" />
</p>
<p>
<label for="logo">Logo: </label>
<input type="file" name="logo" id="logo" size="30" value="'.$getCarrier['viewCarrierRow']['logo'].'" />
</p>
<p>
<input type="hidden" name="editCarrier" id="editCarrier" value="1" />
<input type="submit" name="editCarrierSubmit" id="editCarrierSubmit" value="Update Carrier Info" />
</p>
</form>
');
?>
Comment