We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28000 ☆ A M B ☆
    • 397 Posts
    I have a website running Revo 2.2.2 with Formit 2.1.0 and in one form on the website, the autoresponder is not sending an email with the assigned chunk, but it is sending an email with just a 0 in the content.
    On this particular template, there is a TV that is a radio Button "yes/no" for the admin to include the form.
    I have written a snippet for this with the following code:

    $output='';
    $chunk='workshopForm';
    if($showForm=='Ja'){
    $output.=$modx->getChunk($chunk);
    };
    return $output ;


    The chunk 'workshopForm' contains the Formit Form. It properly displays the form and Formit functions perfectly. It is just the Autoresponder that is not working.

    The formit call is as such:

    [[!FormIt? 
    &fiarFrom=`[email protected]` 
    &fiarSubject=`Registration` 
    &fiarToField=`email` 
    &fiarReplyTo=`[email protected]` 
    &fiarFromName=`Company Name` 
    &fiarTpl=`workshopSenderTpl_[[*lang]]` 
    &customValidators=`fileTypeValidate` 
    &hooks=`email,FormItAutoResponder,recaptcha` 
    &emailTpl=`workshop` 
    &emailSubject=`Workshop Anmeldung` 
    &emailTo=`[[*workshopEmail]]` 
    &submitVar=`sendIt` 
    &validate=`uploadItem:fileTypeValidate,email:email:required,vorname:required,nachname:required, firmenname:required, land:required` 
    &successMessage=`[[%confirmation? &topic=`workshops` &namespace=`my-Templates` &language=`[[*lang]]`]]
    `]]
    


    of course I edited the code here to not show my client's email address and information.

    I also eliminated my custom validator, to see if my own code here was the problem, but it wasn't.

    Any ideas? I would greatly appreciate it!

      Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
      • 3749
      • 24,544 Posts
      Is 'lang' a TV? I suspect that it's not getting set by the time the snippet tag is parsed. You could set it yourself when you get the chunk in your snippet.




      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 28000 ☆ A M B ☆
        • 397 Posts
        Thanks Bob,

        Yes, lang is a TV.

        I already thought of that. I tested it and I still got the same result.
          Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
          • 3749
          • 24,544 Posts
          What happens if you hard-code the full name of the chunk in the &fiarTpl value?


          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 28000 ☆ A M B ☆
            • 397 Posts
            Sorry for not being clear, that is how I tested it. I just wrote the full name of the chunk in it.
            I am wondering what triggers formit to spit out this 0 in the first place....
              Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
              • 3749
              • 24,544 Posts
              I'm afraid I can't think of anything else that would cause it. I've never actually used the AutoResponder hook.


              ------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using.
              MODX info for everyone: http://bobsguides.com/modx.html
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting