We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49447
    • 2 Posts
    Hi Everyone,

    Hope you can help me out with the below.

    I have a page that has two links. One to register for webinar A and one to register for Webinar B. Depending on which one you want to register for I gather different information. I have both forms working when the other one is not mentioned on my page at all.

    So what I need: I need to be able to launch two separate forms from my one page. Below is how I call my forms on click, all that is different is WebinarA vs WebinarB

    <div class="redBoxLink"><a id="custclick" class="contact-link" title="CLEER Customer Registration" href="#" rel="0,1,3,5,6">Register Now</a></div>
    <div class="redBoxLink">[[$frm.CustomerWebinarA? &emailTo=`[[++mail_sendto_ME]]` &emailFrom=`[[++mail_smtp_user]]` &emailReplyTo=`[[++mail_smtp_user]]']]</div>
    <div class="redBoxLink"><span style="line-height: 1.5em;"> </span></div>


    My FormIt code is below, this is on both pages.
    [[!FormIt? &hooks=`email,redirect` 
      &emailTpl=`tpl.EmailRegistrationA` 
      &emailTo=`[[+emailTo]]` 
      &emailFrom=`[[+emailFrom]]` 
      &emailReplyTo=`[[+emailReplyTo]]` 
      &emailSubject=`[[+emailsubject]]`
      &redirectTo=`15` ]]


    Any help would be appreciated!
      • 4172
      • 5,888 Posts
      you need a unique submitVar and placeholderPrefix for each one

         &placeholderPrefix=`a.`
         &submitVar=`webinar_a`


         &placeholderPrefix=`b.`
         &submitVar=`webinar_b`


      have a hidden-field with the name of the submitVar in your forms

      <input type="hidden" name="webinar_a" value="1">


      and replace fi. with your new placeholder-prefixes in all formit-placeholders
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 49447
        • 2 Posts
        Thanks Bruno!

        In regards to my submitvar and my placeholder prefix. Should I put them in the Chunks that have my forms? Or should I put it on the page where my button is that pops up the form? I've tried it in both places but no luck, if you could tell me where I'm going wrong I would appreciate it! Code below

        The below is on my chunks that get called when a button is clicked. Note I added in placeholderPrefix and the submitVar.
        [[!FormIt? &hooks=`email,redirect` 
          &emailTpl=`tpl.EmailRegistration` 
          &emailTo=`[[+emailTo]]` 
          &emailFrom=`[[+emailFrom]]` 
          &emailReplyTo=`[[+emailReplyTo]]` 
          &emailSubject=`[[+emailsubject]]`
          &redirectTo=`15` 
          &placeholderPrefix=`b.`
          &submitVar=`webinar_b`]]


        Then in the same chunk I added in the input you suggest. See below, this is in the form. What does the Value signify? Should I have both at 1?
        <input type="hidden" name="webinar_b" value="1">
        


        Now on my content page where I call the respective webinars I have the below. I added in id and name of my link as webinar b to see if that helped, it didn't.
        <div class="redBoxLink"><a id="webinar_b" class="contact-link" title="CLEER Industry Registration" name="webinar_b" href="#" rel="0,1,3,5,6">Register Now</a></div>
        <div class="redBoxLink">[[$frm.webinar_b? &emailTo=`[[++mail_sendto_darragh]]` &emailFrom=`[[++mail_smtp_user]]` &emailReplyTo=`[[++mail_smtp_user]]'&submitVar=`webinar_b`']]</div>
        <div class="redBoxLink"><span style="line-height: 1.5em;"> </span></div>


        So right now the above will call webinar A form for both my links. I did not understand what you meany by replace my fi. with webinarA. Currently I use $frm.<nameofchunk> to call the forms.

        Thank you for your help!