Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am working on a blog where user can submit his/her story from the UI. Though there are many such options available but all of them will send the document as an attachment to the provided email.

Is there any plugin by which i can handle this in the dashboard. Like if a user submit his/her story it should be visible in the dashboard and i can get the attached document from the dashboard. All i can thin about getting only a notification and rest of all should be manageable from the Dashboard itself.

Thanks in advance

share|improve this question
    
I have created a plugin named "WP User Frontend", you can check this out. –  Tareq Mar 16 '12 at 9:05
add comment

2 Answers

before header :

    <?php $post_id = $post->ID;
if ( isset( $_POST['html-upload'] ) && !empty( $_FILES ) ) {
    require_once(ABSPATH . 'wp-admin/includes/admin.php');
    $id = media_handle_upload('async-upload', $post_id); //post id of Client Files page
    unset($_FILES);
    if ( is_wp_error($id) ) {
        $errors['upload_error'] = $id;
        $id = false;
    }

    if ($errors) {
        echo "<p>There was an error uploading your file.</p>";
    } else {
        echo "<p>Your file has been uploaded.</p>";
    }
}

?>

and after, where you need the upload form:

<?php if ( is_user_logged_in() ) {      ?>

<form id="file-form" enctype="multipart/form-data" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="POST">

<p id="async-upload-wrap"><label for="async-upload">File Upload:</label>
<input type="file" id="async-upload" name="async-upload"> <input type="submit" value="Upload" name="html-upload"></p>

<p><input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id ?>" />
<?php wp_nonce_field('client-file-upload'); ?>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" /></p>

<p><input type="submit" value="Save all changes" name="save" style="display: none;"></p>
</form>
share|improve this answer
add comment

Gravity Forms works well for this. You can create a form which displays on the front end of the site where visitors fill out fields. These can include just about anything you want including letting them upload images or documents. After the form is submitted it will create a draft WordPress "post" which you can then update/edit and publish.

Good luck!

share|improve this answer
    
what i have read Gravity Forms are paid one? –  Umesh Awasthi Feb 5 '12 at 13:30
    
Yes, it's not free. I think it's $40 for a one-site license. Well worth it IMO. You could also try the plugin Formidable but I think that's paid too. –  Michelle Feb 6 '12 at 20:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.