SOLVED

Form Prefill Functionality is not working in embed form

Go to solution
Anonymous
Not applicable

Re: Form Prefill Functionality is not working in embed form

I asked, then I figured it out. I sure do appreciate the quick response

Mark_Brailsford
Level 2

Re: Form Prefill Functionality is not working in embed form

Ryan,

This looks like what I need. A couple of questions:

  1. Is this script a replacement for the provided embed code?
  2. I would replace instanceHost, munchkinId, formid with the values from the embed code?
  3. I would just need to replace the field token pairs?
SanfordWhiteman
Level 10 - Community Moderator

Re: Form Prefill Functionality is not working in embed form

You mean coercing "1" and "" to true and false?

Anonymous
Not applicable

Re: Form Prefill Functionality is not working in embed form

yes.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form Prefill Functionality is not working in embed form

{

  myBooleanField: !!+"{{Lead.Boolean Field}}"

}

Anonymous
Not applicable

Re: Form Prefill Functionality is not working in embed form

Hi All

I am prefilling around 40 fields with the above method and out of 2 fields are not prefilling. I am using the correct API Name and 1 of them is  Company name and 1 is the custom field. Could you please help me in this case.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form Prefill Functionality is not working in embed form

Need more info.  What distinguishes the fields that aren't working? What's the exact output into the JS? Are there syntax errors?

Anonymous
Not applicable

Re: Form Prefill Functionality is not working in embed form

There is no error in the script. There is no difference in all fields. I am using the same method as  Company:  "{{Lead.Company Name}}",

but for the company field, it's not working.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form Prefill Functionality is not working in embed form

It's

     {{Company.Company Name}}

Anonymous
Not applicable

Re: Form Prefill Functionality is not working in embed form

I would apreciate if form-prefill would work in external embedded forms.

Or is there another solution to use the prefill function in external pages?