Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter joelyorca

    (@joelyorca)

    Thanks Nazmul, think I’m very close!

    Is that in a shortcode do you mean? I’ve tried that like this

    <?php echo do_shortcode('[wp-dropzone callback="sending: function(file, xhr, formData) {
        formData.append('id', id_of_dom_here);
    }"]'); ?>

    But I get error.. unexpected id

    • This reply was modified 7 years ago by joelyorca.
    • This reply was modified 7 years ago by joelyorca.
    • This reply was modified 7 years ago by joelyorca.
    Thread Starter joelyorca

    (@joelyorca)

    Where would I configure the sending event? As if doing so in your core functions file the Id wouldn’t be defined.

    Could I call a custom function in the js file, like on success perhaps?

    • This reply was modified 7 years ago by joelyorca.
    Thread Starter joelyorca

    (@joelyorca)

    Hi Nazmul, I’m trying to use the id given in the shortcode to an attachments content (description). WP uses the the post_content value given in the array as the description so I thought I’d be able to set this as the id variable.

    In your core functions where you create the $attachment array, I want to use the value here..

    Ive tried 'post_content' => $id with no luck

    Would yo be able to put me in the right track here?

Viewing 3 replies - 1 through 3 (of 3 total)