Renaming Labels via Embed Script in Forms 2.0 | Community
Skip to main content
June 22, 2016
Solved

Renaming Labels via Embed Script in Forms 2.0

  • June 22, 2016
  • 1 reply
  • 1372 views

Hi Guys,

i'm using the forms 2.0 to handle all contact sales forms on our website. To only use one form in Marketo, i'm overwriting the specific params for each product inside the embed code, which works very well:

<script src="//app-sj04.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_XXXX"></form>

<script>

    MktoForms2.loadForm("//app-sj04.marketo.com", "XXX-XXX-XXX", XXXX, function(form) {

        // Set the value of the Phone and Country fields

        form.vals({

            "Country":"USA",

            "Lead_Offer__c":"Contact Us",

            "LeadChannel__c":"Web Form",

        });

    });

</script>

What i want to do now is to overwrite the existing labels to make the form work on our multilingual website.

The question is: is there any function to also overwrite the default labels via this embed code? is there any function like label.vals ?

Thanks for your thoughts.

Cheers

Ralf

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

There's no native Forms 2.0 API method for this, but check my notes on this old post: https://nation.marketo.com/message/93898#comment-93898

I linked there to a demo of a fully localizable Forms 2.0 form, including labels, placeholder text and even the submit button. It loads translations from a dictionary stored with the form.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
June 22, 2016

There's no native Forms 2.0 API method for this, but check my notes on this old post: https://nation.marketo.com/message/93898#comment-93898

I linked there to a demo of a fully localizable Forms 2.0 form, including labels, placeholder text and even the submit button. It loads translations from a dictionary stored with the form.

June 23, 2016

Thanks! I had a look and it seems that's what i needed.