Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Rinat

    (@rinatkhaziev)

    Hey,

    Check the other notes in plugin’s readme, it’s fairly easy if you know how to use filters. The shortcode part would be

    [fu-upload-form class=”your-class” title=”Upload your media”]
    [textarea name=”caption” class=”textarea” id=”ug_caption” description=”Description (optional)”]
    [input type=”file” name=”photo” id=”ug_photo” class=”required” description=”Your Photo”]
    [input type=”text” name=”email” id=”ug_email” class=”required” description=”Your email”]
    [input type=”text” name=”name” id=”ug_name” class=”required” description=”Your name”]
    [input type=”submit” class=”btn” value=”Submit”] [/fu-upload-form]

    Then you’ll need to add your custom filter to a hook “fu_after_upload” to save your additional information.

    https://www.ads-software.com/extend/plugins/frontend-uploader/other_notes/

    Let me know if this makes any sense to you

    Thread Starter socialpyramid

    (@socialpyramid)

    Hi Rinat. Thanks for the detailed response! I really appreciate that.

    The shortcode additions make a lot of sense, thanks for sharing that. I’m a newbie though and I don’t quite know how to implement the last part, namely “Then you’ll need to add your custom filter to a hook “fu_after_upload” to save your additional information.”

    I see in that link it says this: add_action( ‘fu_after_upload’, function( $attachment_ids ) { // do something with freshly uploaded files // This happens on POST request, so $_POST will also be available for you } );

    I’m not sure how to modify that string in this case for those fields, but I suspect I have to tell it to address those fields in particular. Also, does this after upload code go on the same page as the other shortcode?

    Thanks!

    Plugin Author Rinat

    (@rinatkhaziev)

    Do you have any experience with PHP/ and theme development for WordPress?

    You should place this code in your theme’s functions.php. E.g (not tested):

    add_action( 'fu_after_upload', 'my_fu_after_upload' );
    
    function my_fu_after_upload( $attachment_ids ) {
        foreach( $attachment_ids as $aid ) {
            // do something with your additional data
        }
    }
    Thread Starter socialpyramid

    (@socialpyramid)

    I have never used PHP and I’m not a programmer although I am pretty good with WordPress and computers in general. Thanks again!

    I’ll give this a try and investigate further when I get back in town from a trip.
    Best

    Plugin Author Rinat

    (@rinatkhaziev)

    mmmmagnus, I replied to your thread.

    Hello Rinat,
    I have installed the plugin and everything seems to work well except when I got to Media/Manage UGC/File, the only information that shows up from the form is Title,Description and the uploaded photo. I havent been able to see the Author,Email Address, Credit etc. I am fairly new to WordPress and have read through the plugin’s ReadMe file. Any tips?

    Thank You

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Is there a way to add email and name fields to the Frontend Uploader form?’ is closed to new replies.