Re: File Upload Field

Anonymous
Not applicable

File Upload Field

How do I set a form field that allows the user to upload file or image?

30 REPLIES 30
Justin_Cooperm2
Level 10

Re: File Upload Field

Where is the file going to be uploaded? We don't support upload to Design Studio via forms.

Anonymous
Not applicable

Re: File Upload Field

We issue media credentials and need to allow a lead to upload a head shot of themselves. The image would be uploaded with the rest of the data, like we're currently able to do with Formstack.

Jared Shurtliff | Web Developer

jshurtliff<mailto:jshurtliff@stormbasketball.com>@StormBasketball.com<mailto:AMiller@StormBasketball.com>

Seattle Storm | P 206.272.2546 | *

3421 Thorndyke Avenue West, Seattle, WA 98119

www.StormBasketball.com<http://www.stormbasketball.com/> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.twitter.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm> <http://www.facebook.com/seattlestorm>

<http://www.facebook.com/seattlestorm>

Justin_Cooperm2
Level 10

Re: File Upload Field

You can't upload files right now, but you can add a textbox where they can insert a link to an image on the web and then store that. If you need to do file i/o, you'll have to write a custom adapter or use a 3rd party offering.

Justin_Cooperm2
Level 10

Re: File Upload Field

By the way, by "write a custom adapter" I mean leverage our APIs to create a file in Marketo. You would have to manage the I/O though.

Justin

SanfordWhiteman
Level 10 - Community Moderator

Re: File Upload Field

Jared, although Marketo doesn't officially support file fields on leads, I posted this method time ago and it should be a great fit for a headshot pic: HOWTO: Attach images to a Forms 2.0 form post.

For a more robust solution I am a gigantic fan of Uploadcare​.  Tell them I sent you (I don't get any referral or anything, I just promised them more Marketo folks would be into it).  Let me know if you want to see a sample integration.

Paul_Drago
Level 2

Re: File Upload Field

Hey Sanford,

I'd love to see a sample integration--  I am looking at this MktoForms2 :: Uploadcare  and I am wondering if that is the sample of which you speak? 

SanfordWhiteman
Level 10 - Community Moderator

Re: File Upload Field

Yep, that's a pretty good one. I added a little more validation just now.

There are other ways to insert the host INPUT element -- the element that gets augmented with the UploadCare widget HTML. Here you see I create the host element dynamically via addHiddenFields and then move it where I want in the form (i.e. at the top).

Paul_Drago
Level 2

Re: File Upload Field

Just got back to this and I used more or less the same implementation--  UploadCare widget, input the element into HTML.  Let UploadCare populate the URI.     Super Simple and clean concept-- thanks for the direction Sanford!

SanfordWhiteman
Level 10 - Community Moderator

Re: File Upload Field

Great!