Allow PDF upload for a comment to a question?

6.85K viewsGeneralupload
0

I found the support topic which will allow for a PDF to be uploaded when a question is submitted, but is is possible to allow a user to add/upload a PDF in a comment? Thanks.

0

Hello Rahul,

Thank you for the update. I added the code as provided, however the hook code resulted in a fatal error and could not be added.

Is the hook going to allow for a PDF to be uploaded to a Reply of a Question?

commented on answer

Hello Michael,
Could you please share error message.

0

Thanks Rahul. I did find the code to add it to the question, but the upload field does not appear in the comments section. Do I need to add something? I think the best solution is to allow the upload for the Post an Answer. Is it related to the

add_filter( ap_question_form_fields, my_custom_question_field );

Do I need to list the comment and post answer fields? If so, what are they called? Sorry, I am familiar with php, but not writing from scratch. Thank you for your help.

commented on answer

AnsPress form API does not auto save anything. You have to process upload by yourself. But all codes still exists in AnsPress. More people have requested this so I am writing doc for it.

Thank you Rahul. Will you comment on this thread once the doc has been created. Again many thanks. I think this is a good feature as users who are responding to a question with an answer may want to add a supporting document (PDF) to their answer. Of course they could use Dropbox or Google Drive and provide a link in their answer, but allowing them to upload a PDF in their Post Answer would make it very simple.

Can you create an option “insert pdf files”

I agree with Michael Winn.

0

Yes, of course. As AnsPress uses same API for all forms so you can easily add pdf upload field for comments as shown for question form in our FAQ.