Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How do I add a form field of type = "file"?

+2 votes
asked Jul 21, 2011 in Q2A Core by G4

and so that was forwarded to my plugin?
I want to make a plug-in "upload photos to the question" (not through the editor CKEditor)

1 Answer

0 votes
answered Jul 24, 2011 by gidgreen

You'd have to hard-code the HTML code for the file upload field - just insert it into the field's 'label' element. Also don't forget to set ENCTYPE="multipart/form-data" in the form's 'tags' element. You can access the uploaded file in the usual way, using PHP's $_FILES array. See qa-page-account.php for an example.

commented Jul 25, 2011 by G4
Thanks for the answer, but
how to add a link to download the form or upload field in the form of creating the post, using only the plugin?