Support

Account

Home Forums General Issues front-end user form with image upload

Helping

front-end user form with image upload

  • I’m working on a site where users can submit content through a simple form. I’m using jQuery File Uploader right now, which is uploading to a “uploads/files/” folder inside my theme.

    Once uploaded, I return the image URL to ACF and store it using add_post_meta as “imageurl”.

    Here’s what my ACF looks like for that field: http://cl.ly/image/182z1D473j3F

    However, when I go into that post (as Admin)… I don’t get a preview of the image: http://cl.ly/image/1I2s3Q3c1R0D

    What am I missing? Is there a better way to do front-end user image uploading? Or an easy way to tie into the Featured Image?

    Thanks.

  • Hi @stursby

    Quite simply, the image field in ACF expects the value to be attachment ID.

    It seems that your up loader is not inserting the attachment into the DB like WP does, so the ACF image field just wont work.

    Perhaps you will need to use a text field to store the uploaded path / url.

    Thanks
    E

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘front-end user form with image upload’ is closed to new replies.