SOLVED

Re: UploadCare Integrated but Not Populating Marketo Field with URL to file

Go to solution
maggie_Ring
Level 2

I have integrated UploadCare into my landing pages in Marketo but my marketo field is not populating with the link to file. I have followed this document: https://kb.uploadcare.com/article/251-is-there-integration-with-marketo-forms. I can go into the Uploadcare account to see file but that doesn't help me out. Does anyone see anything wrong with the above steps?

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator

Two major problems here:

1. You're referring to a field Uploaded_File but there's no such field on your form.

2. Their recommended code is broken. You would need to use this code for it to be reliable (remove the <script> you previously added):

MktoForms2.whenReady(function(form){

// this field name must exist on your form!
var ucareField = "Uploaded_File";

/* --- no need to touch below this line --- */

var formEl = form.getFormElem()[0],
ucareEl = formEl.querySelector("input[name='" + ucareField + "']");

ucareEl.setAttribute("role","uploadcare-uploader");

});‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

View solution in original post

15 REPLIES 15
maggie_Ring
Level 2

Here is the template. Do you need a landing page instead? https://app-ab14.marketo.com/#LT251B2ZN12

SanfordWhiteman
Level 10 - Community Moderator

Of course, need a publicly accessible page showing your current attempt.

maggie_Ring
Level 2
SanfordWhiteman
Level 10 - Community Moderator

Two major problems here:

1. You're referring to a field Uploaded_File but there's no such field on your form.

2. Their recommended code is broken. You would need to use this code for it to be reliable (remove the <script> you previously added):

MktoForms2.whenReady(function(form){

// this field name must exist on your form!
var ucareField = "Uploaded_File";

/* --- no need to touch below this line --- */

var formEl = form.getFormElem()[0],
ucareEl = formEl.querySelector("input[name='" + ucareField + "']");

ucareEl.setAttribute("role","uploadcare-uploader");

});‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
Lori_Valencia
Level 1

Hi Sanford -

 

Would you be able to help with this? I have added all of the codes but the upload button is in what wrong place. 

maggie_Ring
Level 2
SanfordWhiteman
Level 10 - Community Moderator

You're not using the correct field name.

The field name on your form is

   uploadedFile

Field names must be an exact, case-sensitive match.

maggie_Ring
Level 2

Thank you. Do you know if the the field type needs to be set to String or URL?

Lori_Valencia
Level 1

Does this save as a URL in marketo? Or can you only access the URL through the uploadcare portal?

SanfordWhiteman
Level 10 - Community Moderator

String.

maggie_Ring
Level 2

OK, the field name has been corrected and it is set to string. I am still not getting the field populated with the URL. Do you see anything else i am missing? Perfusion Careers | Perfusionist Jobs with SpecialtyCare 

SanfordWhiteman
Level 10 - Community Moderator

In fact, it is working:

pastedImage_2.png

But you have an extra uploader button you've added to the LP, which is probably confusing you. Take that out:

pastedImage_1.png

maggie_Ring
Level 2

Yep you are right. Removed the hidden button code Uploadcare provided and it worked! Thank you so much!

SanfordWhiteman
Level 10 - Community Moderator

OK, please mark my answer as correct (preferably the one that starts with "Two major problems here...").

SanfordWhiteman
Level 10 - Community Moderator

We need your actual page to check your work.