jQuery form address fields not displaying

Hi THEMCO and forum,

I’m using a web widget from Donorfy to process donations to a charity. The code they provided is causing the error below -

jQuery(document).ready(function(){var e={key:"DE36-DJ93-CJ76-YN86",bar:{showCountry:false},countries:{codesList:"GBR"}},d=[{element:"AddressSearch",field:"",mode:pca.fieldMode.SEARCH},{element:"Address1",field:"Line1",mode:pca.fieldMode.POPULATE},{element:"Address2",field:"Line2",mode:pca.fieldMode.POPULATE},{element:"Town",field:"City",mode:pca.fieldMode.POPULATE},{element:"County",field:"Province",mode:pca.fieldMode.POPULATE},{element:"Postcode",field:"PostalCode",mode:pca.fieldMode.POPULATE},{element:"Country",field:"CountryName",mode:pca.fieldMode.COUNTRY}],o=new pca.Address(d,e);o.listen("populate",function(){document.getElementById("AddressSearch").value=""}),o.load()});

This only appears when I’m not logged into the WP admin area. When I am logged into WP admin the form displays perfectly.

Can you help?

Thanks, David

I fixed this with some further troubleshooting. It appears the error was coming up because I added the code for the web widget into a Cornerstone Content element. Instead, I added the code directly into the text editor.

Hi,

Glad you were able to figure it out.

Have a nice day! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.