[Plugin: Custom Field Template] Getting PDF's to work
-
I created this custom field:
[Material] type = file label = Please upload PDF size = 30 relation = true mediaLibrary = true mediaPicker = true mediaRemove = true multipleButton = true multiple = true
I want to be able to upload a PDF in the admin and display it in a post. I am echoing the attribute with the following code, and all it does is output a number 103. So I know I am doing something wrong here, but I’m still a novice PHP guy. I am also having a problem with the checkbox’s and arrays. The output just prints “array”.
<?php if(isset($attr['Material']) && !empty($attr['Material'])){ echo '<div class="instructor">',$attr['Material'], '</div>'; }?>
I should also note that I can not delete the file after it’s already been uploaded unless I delete the file from the library, i.e. the mediaRemove button is not working properly.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: Custom Field Template] Getting PDF's to work’ is closed to new replies.