Form Pre-Fill on Wordpress Page | Community
Skip to main content
Clinton_Hutson
New Participant
July 20, 2021
Question

Form Pre-Fill on Wordpress Page

  • July 20, 2021
  • 1 reply
  • 2116 views

I have used Sanford's instruction set here: https://blog.teknkl.com/pre-fill-any-site-any-form/

I can not seem to get any of the data passed into the form.  The web page is: https://www.lifesize.com/en/contact-us-prefill/?mkt_tok=NzI1LUVLSi0xMDEAAAF-Y670HWLuJBAh5olPe9aaU4N-mi2RajSX78RK1x4547BRiWtH9GXxhUCuoi9bulNaeeH6JQYW6Fwk_2SLow6WvW8ORAxVex3k4zKN_yT77XpYMS0

Not sure exactly what I am doing wrong.  Any thoughts would be greatly appreciated!  @sanfordwhiteman I have also attached the script code below: 

<!-- / Mkto Munchkin lib \ --> <!-- standard Munchkin embed code goes here, just reminding you! --> <!-- \ Mkto Munchkin lib / --> <!-- / Mkto Forms 2.0 container, library, load form \ --> <form id="2072"></form> <script id="mktoForms2" src="//app-ab26.marketo.com/js/forms2/js/forms2.min.js"> </script> <script> MktoForms2.loadForm( "//app-ab26.marketo.com", "725-EKJ-101", 2072 ); </script> <!-- \ Mkto Forms 2.0 container, library, load form / --> <!-- / TEKNKL extended libraries \ --> <script id="teknklSimpleDTO-1.0.4" src="https://pages.lifesize.com/rs/725-EKJ-101/images/teknkl-simpledto-1.0.4.js"> </script> <!-- \ TEKNKL extended libraries / --> <!-- / Call DTP to pre-fill form \ --> <script> var DTO = new SimpleDTO({ domain: "lifesize.com", dataSrc: "https://pages.lifesize.com/dtp-1.0.4.html", debug: true, mode: "receive", cb: function(instance){ var mktoFields = DTO.getGlobal()["mktoPreFillFields"]; DTO.cleanup(); MktoForms2.whenReady(function(form) { form.setValuesCoerced(mktoFields); }); } }); </script> <!-- \ Call DTP to pre-fill form / -->

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
New Participant
July 20, 2021

Two big problems here:

 

1. You’ve somehow HTML-encoded the script, so it’s not running at all, it’s just text.

 

2. Lots and lots of console errors because of load order. You need to make sure the Forms 2.0 library is loaded before code that does forms-related customizations.