/ Published in: PHP

Just a quick and dirty way to handle file uploads in admin tools
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<div class="formRow"> <label for="related_file">Related File:</label> <? if ($oEvent->is_populated("related_file")) { echo "<span id=\"replaceFileInfo\">Currently ".$oEvent->get("related_file").". <a href=\"#\" onclick=\"document.getElementById('docUploadBox').style.display='block';document.getElementById('replaceFileInfo').style.display='none';return false;\">Replace?</a></span>"; echo "<span id=\"docUploadBox\" style=\"display: none;\">"; } else { echo "<span id=\"docUploadBox\">"; } ?> <input type="file" class="fileUpload" tabindex="9" name="related_file" id="related_file" /> </span> </div>
Comments
