\t", "upvoteCount": 1, "url": "https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000LGBKTSA5", "datePublished": "2022-11-17T10:47:20.000Z", "author": { "@type": "Person", "name": "Antoine HECQUARD", "url": "https://trailblazers.salesforce.com/profileView?u=0054S000001WmDQQA0", "affiliation": { "@type": "Organization", "name": "Freelance" } } } ] } }
Skip to main content

I have a requirement to dynamically update Pardot form labels and placeholder text to the native language of the visitor. Pardot form is hosted on an external webpage where is a dropdown to change the preferred language. Based on the selected language, the webpage content gets updated automatically.

Is there a way in Pardot that the form texts and labels could also be updated to the desired language dynamically?

6 answers
  1. Nov 17, 2022, 10:47 AM

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>

    <script>

    $(document).ready(function(){

    var url_string = window.location;

    var url = new URL(url_string);

    var language = url.searchParams.get("language");

    var body = $("body").html();

    if(language == "fr"){

    body = body.replace("My name is Antoine","Je m'appelle Antoine");

    body = body.replace("Hello","Bonjour");

    }

    else if(language == "es"){

    body = body.replace("test","testo");

    }

    $("body").html(body);

    });

    </script>

0/9000