title: How to have multiple marketo js forms on a page with different success options
body: <p>I am trying to make a reusable js component the uses a marketo form thats embedded in the page through their js apis. I am taking the form and putting it in to a bootstrap modal and the modal is toggled using a link. </p>
  
  <p><strong>Here is the html</strong></p>
  
  <pre><code>&lt;div class="modal-form" 
                  data-form-id="1619" data-success-url="https://google.com/" data-redirect="true" 
                  data-form-result="blank" data-sucess-msg="false"&gt;
                  &lt;a type="button" class="cta-button secondary-button" data-toggle="modal" data-target="#mktoForm_456-modal" &gt;
                      New Tab Redirect Form
                  &lt;/a&gt;
                  &lt;div class="modal fade" id="mktoForm_456-modal" tabindex="-1" role="dialog"&gt;
                      &lt;div class="modal-dialog"&gt;
                          &lt;div class="modal-content"&gt;
                              &lt;div class="modal-header"&gt;
                                  &lt;div class="logo"&gt;&lt;/div&gt;
                                  &lt;h4&gt;Test Form Title&lt;/h4&gt;
                                  &lt;button type="button" class="close x-button" data-dismiss="modal" aria-label="Close"&gt;
                                      &lt;span aria-hidden="true"&gt;&amp;nbsp;&lt;/span&gt;
                                  &lt;/button&gt;
                              &lt;/div&gt;
                              &lt;div class="modal-body"&gt;
                                  &lt;div class="modal-form-content" id="modal-mktoForm_1619-intro"&gt;
                                      &lt;h2&gt;Secondary  Redirect in new tab&lt;/h2&gt;
                                  &lt;/div&gt;
                                  &lt;form id="mktoForm_1619"&gt;&lt;/form&gt;
                                  &lt;div class="modal-form-content" id="modal-mktoForm_1619-chaser"&gt;
                                      &lt;p&gt;Bye Bye.&lt;/p&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;&lt;!-- /.modal-content --&gt;
                          &lt;div class="modal-sucess-msg" id="modal-success-1619"&gt;&lt;/div&gt;
                      &lt;/div&gt;&lt;!-- /.modal-dialog --&gt;
                  &lt;/div&gt;&lt;!-- /.modal --&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p><strong>Here is the js</strong></p>
  
  <pre><code>$('.modal-form').each(function () {
          var formModal = $(this);
          var formID = $(this).attr('data-form-id') || 1619;
          var componentID = $(this).attr('data-componentID') || '';
          var formRedir = $(this).attr('data-redirect') || false;
          var formResult = $(this).attr('data-form-result') || "blank";
          var formSucessUrl = $(this).attr('data-success-url') || '';
          var formSuccessMsg = $(this).attr('data-sucess-msg') || false;
          MktoForms2.loadForm("//app-ab13.marketo.com", "754-FXO-315", formID, function (form){ 
              form.onSuccess(function(values, followUpUrl){
                  formModal.find(".modal-content").fadeOut('fast');
                  if (formRedir == "true") {
                      if (formResult == "blank") {
                          window.open(formSucessUrl, '_blank');
                          formModal.find(".modal.fade").modal('hide');
                      } else {
                          location.href = formSucessUrl;
                      }
                  } else if (formRedir =="false" &amp;&amp; formSuccessMsg =="true") {
                      formModal.find(".modal-sucess-msg").fadeIn(100).delay(5000).fadeOut('slow').delay(600, function(){
                          formModal.find(".modal.fade").modal('hide');
                          formModal.on('hidden.bs.modal', function () {
                              formModal.find(".modal-content").show();
                              formModal.find(".modal-sucess-msg").hide();
                          });
                      }); 
                  }
  
                  return false;
              });
          });
      });
  </code></pre>
  
  <p>One of the requirements is to use the same form (contact form) and configure it to have different success urls defined. So have multiple links, modals w/ forms, and redirects urls.</p>
  
  <p>So is there a way to define an alternate form tag id besides their mktoForm_&lt;>?</p>