How to use Forms 2.0 JS API with Drupal form as content type
Can anyone know how to submit a lead using Forms 2.0 JS API (on the client side) to the Marketo database directly, when someone submits Drupal form?
Can anyone know how to submit a lead using Forms 2.0 JS API (on the client side) to the Marketo database directly, when someone submits Drupal form?
Sample of form markup is
<form action="https://pages.example.com/index.php/leadCapture/save" method="post">
<input type="hidden" data-comment="the numeric form ID" name="formid" value="9999">
<input type="hidden" data-comment="your Munchkin ID" name="munchkinId" value="123-AAA-456">
<input type="hidden" data-comment="the Thank You URL" name="retURL" value="https://www.example.com/thankyou">
<input type="hidden" data-comment="you must fill this with the current document.location.href if you want it logged in Marketo" name="_mktoReferrer" value>
<input type="hidden" data-comment="will be filled automatically with the Marketo cookie value, you need only include the field" name="_mkt_trk">
</form>where pages.example.com is your primary LP domain or a domain alias.
And of course you need to use the Marketo field names.
Don't know why you'd want to do it this way, as it means you need to make your Drupal form look (structurally) exactly like a Marketo form, which isn't very flexible and in some cases might not even be possible. If you want to use a custom form I recommend going fully custom and using the Forms 2.0 JS API method.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.