Re: Form submission alert creates new lead

Jason_Terrell
Level 3

I've got a form for updating certain data by the contact.  Not really sensitive data.  Just gives the person a chance to update a couple of minor pieces of information.

Thanks to help from people here (you know who you are) I was able to get the form working and triggering an alert.

However, the only information available on the alert seems to be merely the fields on the form.

When I check the results from the trigger campaign, it seems to be creating new leads, and the leads don't have any linking information to the regular record.

If I try to use a token such as  {{my.token:default=unknown}} for the contact or a contact token, it returns as blank, not even as "unknown"

If I use Email Address: {{lead.Email Address:default=unknown}}, it returns "unknown"

Looking in the database for the created lead, it's got only those fields from the form, even though the created date shows as back in June.

I'm guessing I could put in a hidden form field with the email address, but this seems like it's a security issue.  Anyone could update someone else's data that way.

It also seems like it shouldn't be necessary.


What am I doing wrong?

19 REPLIES 19
Shashank_Sharma
Level 2

Hi Jason,

Looking at your form, I don't see a visible or a hidden field for capturing email address on the form. For form fills, Marketo will look for an existing email address in lead database, it will update the data if a match is found, else it will create a new lead with the information captured upon form submit.

Not sure if you're passing Email via some custom code, but as long as you have email address field on the form, it should update the record in Marketo.

Thanks,

Shashank Sharma

Jason_Terrell
Level 3

Strange.  I added two hidden fields to the landing page but neither of them are showing up in the html.  Not simply just empty, but not there at all.

I added them as form fields and set them to be hidden.

Shashank_Sharma
Level 2

Hi Jason,

You might want to check if you approved the landing page again after making changes to the form. I miss to re-approve a lot of times.

I'd also ensure the hidden field is set to pre-fill on the form so that this works for people who'd be coming from a Marketo email or have filled out a form previously.

Thanks,

Shashank Sharma

Jason_Terrell
Level 3

Thanks Shashank.  I had neglected that. The hidden fields show on the landing page now.  I'll see if they work now.

Jason_Terrell
Level 3

Hi Shashank,

thanks.  I'll try adding that.

SanfordWhiteman
Level 10 - Community Moderator

Ditto Josh. You have to tell us what this "Form Submission Alert" is (that's not a Marketo term, or the closest Marketo term is a Send Alert on Filled Out Form activity, which has nothing to do with creating a new form).

Jason_Terrell
Level 3

When the user clicks a button on the email, it goes to an Update Property landing page with a form. (a marketo landing page and form)

The form has a submit button.

I have another campaign with a trigger that hits on "user fills out form".  This sends an email alert to the sales owner.

When the alert is sent, only the lead data from the form is there, and only the data that the user selected.  If they didn't pick something, even if it defaulted, it's showing as blank on the alert.

None of the tokens from the contact shows.

Jason_Terrell
Level 3

I modified the form to use Required for the fields and that none of the fields are defaulted.


Two of the form fields work display to the user now but the third one won't.  The first two that work is a drop down list (Select) and a text box.  The third is another drop down box with just yes and no.  This one ends up returning either a 1 or blank.

The tokens still won't work but I think I can add a hidden form field to do the job.

SanfordWhiteman
Level 10 - Community Moderator

Is the link mkt_tok-enized (does it end with the query param mkt_tok after being redirected)? And is the page running Munchkin?

If not, the form post will by definition create a new lead (there's nothing else to go on).

Jason_Terrell
Level 3

Sanford Whiteman wrote:

Is the link mkt_tok-enized (does it end with the query param mkt_tok after being redirected)? And is the page running Munchkin?

If not, the form post will by definition create a new lead (there's nothing else to go on).

The link on the landing page does show the mkt_tok value.  Munchkin?  Isn't that for non-marketo sites?  Do I need that?  The landing page and everything is on Marketo.

I don't really care if it creates the new lead. I'm just trying to get it to show the other data for the contact when the alert is triggered.

The hidden field idea I tried didn't work either.  The hidden field value isn't getting saved to the lead.

SanfordWhiteman
Level 10 - Community Moderator

Munchkin is for all pages, not just 3rd-party, and it can be disabled for Marketo LPs (enabled by default).

You'll have to post your URL for further work on this.  I'm in the dark about what you could be doing with a basic, non-customized Forms 2.0 form to create fields that don't populate in accordance with the form descriptor (descriptor = Form Editor config).

Jason_Terrell
Level 3

Well, when I look at the html on the landing page, I do see some hidden fields and one of them is labeled Munchkin.  It's also loading the munchkin.js file.

The url is http://pages.xpresstaxappeals.com/HEX-Refund-Master_Update-Property-Tax-Record.html

Normally there are some query fields attached but those are just for the fields on the left, plus the mkt_tok as well.

SanfordWhiteman
Level 10 - Community Moderator

Yes, Munchkin is loading.

I'll inspect the form when I get back to my desk, but I can tell you right now that the code you're attempting to use to populate from query params is broken. You must not use DOM element values (nor jQuery element accessors) to set Marketo form values. Use only Marketo accessors (setValues) and only after the form is ready (whenReady). There is no guarantee that the elements will be ready otherwise (network and device conditions will cause different results).

Jason_Terrell
Level 3

The query fields aren't setting the form values.  They are setting some fields on the left, outside of the form.  That actually works.

It also isn't really relevant to the issue.  I'm trying to fix the third field, which returns either a 1 or a blank instead of a yes or no, and to get the alert (which is called when this form is submitted) to include the tokens from the contact.

SanfordWhiteman
Level 10 - Community Moderator

What is the data type of the 3rd field in Field Management?

Jason_Terrell
Level 3

It's a boolean value in the database.

>If you don't expect those fields to be posted with the form, then they're not "fields" per se.

Ok.  They are setting some NON-field Display-only TD cells, on the left, outside of the form, so don't get confused into thinking the query data is meant to update the form fields which consist of only those three displayed real-Fields.

SanfordWhiteman
Level 10 - Community Moderator

Boolean fields are stringified as "1" or "".

If you want other values, use Velocity to change the output (true/false, yes/no, ham/spam).

#set( $friendlyBoolean = {  

  "1" : "mind",

  "" : "matter"

} )

${friendlyBoolean[$lead.yourBooleanField]}

SanfordWhiteman
Level 10 - Community Moderator

If you don't expect those fields to be posted with the form, then they're not "fields" per se.

Josh_Hill13
Level 10 - Champion Alumni

Can you share with us the page and smart campaign?

  • My Token doesn't have defaults and are run at the Program Level, so not sure what you are expecting.
  • If you tell a new person to fill out this form, then it will create a new Lead. How are you getting your existing people to this form?
    • is it set to prefill?
    • Is it displaying the data on the form page?
    • What Alert are you talking about?
    • what data are you asking for?