Skip Navigation

[Resolved] CRED form image upload thumbnail without using native WP media uploader

This support ticket is created 4 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by coreyP-2 4 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#1634559
Screen+Shot+2020-05-22+at+9.51.48+AM.png
Screen+Shot+2020-05-22+at+9.52.37+AM.png

I've seen several tickets about this issue, but not sure I have a clear answer. I'm using an image upload field on a CRED form and I do not want to give users access to the WP Media Uploader. As of now, it looks like my only options for displaying the uploaded image in the form are "filename" and "complete URL".

If we can return the full URL of the image, is there some reason I can't display the image itself? If there's not a built-in setting, is there a hook in the API I can use to rewrite the output of the preview?

Keep in mind I'm not looking for AJAX functionality. I just want to show a thumbnail of an image that's already been uploaded. Thanks!

#1634683

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Corey,

Thank you for getting in touch. Basically what you are trying to achieve isn't possible unless you use the Media uploader for wordpress.

This is because with the classic php upload method the image isn't uploaded until the form has been submitted, so even if a URL is being generated the image isn't actually uploaded to the site as yet so you're not able to get the thumbnail for the image.

Thanks,
Shane

#1634693

Thanks Shane – I understand that and should have been more specific. I'm using a Post Edit form, so the image has already been uploaded. I'm trying to allow a user to see what the existing image is before deciding to change it.

#1634981

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screenshot 2020-05-22 at 4.02.20 PM.png

Hi Corey,

There should be an option to display it as an HTML Tag. see screenshot

This is a custom field created in our Types plugin correct or is this a generic field added to the form?

Would you mind allowing me to have admin access to the website so that I can check on this further for you ?

The private fields will be enabled for your next response. Also please let me know a post that I can test this.

Thanks,
Shane

#1638671

Hi Shane – Totally my fault. I had seen the option for "As an image HTML tag" in screenshots on other threads, but didn't have it available on my site. I figured maybe that was an old feature. Turns out I was working with a "File" field as opposed to an "Image" field. Sorry for the bonehead mistake and thanks for your help!