Ana Donos
Ana Donos

Reputation: 1

How to style an external form embed - Marketo

can somebody please help me with this problem: I want to style in html an embedded form from Marketo. I have the script, however I'm not managing to style it. I am a beginner so sorry for the noob question. I have tried to add a style tag for the #mktoForm_3402 but that doesn't affect anything

<script src="//app-lon06.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_3402"></form>
<script>MktoForms2.loadForm("//app-lon06.marketo.com", "232-EET-259", 3402,function(form) {
  // Set the value of the company and the webpage where the form is embedded
  form.vals({"siteOrigine":"PentalogHR"});
  form.vals({"visitedwebpage":"www.pregatitpentrumaine.ro/"});
  //Add an onSuccess handler
  form.onSuccess(function(values, followUpUrl) {
    // Take the lead to a different page on successful submit, ignoring the form's configured followUpUrl
    location.href = "http://digital-platform.pentalog.com/LP-Budget-IT-Thank-You.html";
    // Return false to prevent the submission handler continuing with its own processing
    return false;
  });
});</script>

Upvotes: 0

Views: 477

Answers (1)

Tyrell Curry
Tyrell Curry

Reputation: 381

You must use the !important property after all your CSS declarations when styling a Marketo Form. These Marketo Forms are notorious for being very fussy with styling. Look for class names to target.

Update: If you want to completely de-style the Marketo Form, use Sanford Whiteman's code here.

Upvotes: 0

Related Questions