We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28215
    • 4,149 Posts
    Quote from: TomMLS at Aug 19, 2010, 11:32 AM

    A major/glaring/uncorrected weakness of this addon is its inability to pass form values to anything but the email chunk.
    Also the field names seem to be hard-coded into the addon, but I haven’t proven this yet.
    This is why my post asks several questions about fields etc. usage, to which the addon developer has not responded.
    Thank you, Tom
    Tom,

    I haven’t had time to respond. However, since this is an open source community, if you’d like to contribute the code to fix this issue, please feel free to. GitHub allows you do to that quite easily.
      shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
      • 28215
      • 4,149 Posts
      Quote from: JimKillock at Aug 19, 2010, 11:26 AM

      Is this right or is there a way of inserting the email subject from the form into the email subject line itself?

      It should automatically do that, if you have a field named ’subject’, leave &emailSubject blank, and make sure &emailUseFieldForSubject is set to 1 (the default).

      The code in question is:
      if (!empty($fields['subject']) && $this->modx->getOption('emailUseFieldForSubject',$this->formit->config,true)) {
        $subject = $fields['subject'];
      } else {
        $subject = $this->modx->getOption('emailSubject',$this->formit->config,'');
      }


      Placeholders in the subject aren’t supported at this time, but that’s a good idea, and would make a good feature request to file here.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 30319
        • 406 Posts
        I would like to but I’m not a programmer of any kind.

        I would update the documentation if I knew how to use the &cc and $bcc, are they all lower-case or camel-case, for example??
        I do not know why &emailFromName does not work, at least in my experience.

        My question about the ’fields’ seems to be a way to obtain and pass the form fields’ values over to the redirect page, but we all need more information to understand it...at least I do. smiley

        Thank you, Tom
          • 1778
          • 659 Posts
          @Jim :

          If the [[+subject]] you want to see in the email is the selected value from the select field in the code (eg subject=General enquiries, or Press..., or Partnering Opportunities :
          <select id="cfRegarding" name="cfRegarding:required" value="[[+fi.cfRegarding]]">
                      <option value="General Inquiries">General Inquiries</option>
                      <option value="Press">Press or Interview Request</option>
                      <option value="Partnering">Partnering Opportunities</option>
                  </select>
          
          


          You have to put [[+cfRegarding]] (the name of the field, here the "select" field name is "cfRegarding") in your EmailChunkTpl

          It should work, I tried it I have a complex form done with formit and no problem to send the values I want to see in the email...

          Hope this helps
          Feel free to contact me if you have problems
            • 30319
            • 406 Posts
            Quote from: anso at Aug 19, 2010, 12:11 PM

            @Jim :
            It should work, I tried it I have a complex form done with formit and no problem to send the values I want to see in the email...
            Hope this helps
            Feel free to contact me if you have problems

            anso, did you figure out how to get &EmailFromName to work??

            I tried using [[+name]] and [[name]] and neither one worked for me, as I wanted to have the email From: field show the person’s name (with email) rather than the email address...

            Thank you, Tom
              • 1778
              • 659 Posts
              Tom,

              I did few quick tests :

              &EmailFromName seems to work only with a static value (i.e: &EmailFromName=`My Site`)

              To have the subject field of the form as the subject field for the email
              1 - field subject have to be named "subject" (i tried with "object" instead it does not work)
              2- the param to be set is : "&emailUseFieldForSubject=`true` " or &emailUseFieldForSubject=`1` (both work)...

              Hope this helps, let me know...
              Cheers
                • 30319
                • 406 Posts
                Hi anso, thank you...

                I did not think of using a static value because that does not fit my requirements...
                I think perhaps the addon developer or someone else must devote more time to making the form field values easier to retrieve and use as people may wish them to do so...
                I am not a programmer so I cannot do that...

                Thank you, Tom
                  • 28215
                  • 4,149 Posts
                  Quote from: TomMLS at Aug 19, 2010, 02:19 PM

                  I think perhaps the addon developer or someone else must devote more time to making the form field values easier to retrieve and use as people may wish them to do so...
                  Tom, I’ll get to it when I can; until then, you’ll have to wait for someone else to submit a patch for it. This is free software, after all. And "people may wish them to do so" is passive-aggressive. Thanks for your input.

                    shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                    • 30319
                    • 406 Posts
                    Quote from: splittingred at Aug 19, 2010, 03:08 PM

                    Tom, I’ll get to it when I can; until then, you’ll have to wait for someone else to submit a patch for it. This is free software, after all. And "people may wish them to do so" is passive-aggressive. Thanks for your input.

                    I apologize.
                    I didn’t realize you’d consider the phrase passive-aggressive.
                    I had no intention of doing that.
                    Thank you, Tom
                      • 3749
                      • 24,544 Posts
                      Quote from: splittingred at Aug 19, 2010, 03:08 PM

                      Quote from: TomMLS at Aug 19, 2010, 02:19 PM

                      I think perhaps the addon developer or someone else must devote more time to making the form field values easier to retrieve and use as people may wish them to do so...
                      Tom, I’ll get to it when I can; until then, you’ll have to wait for someone else to submit a patch for it. This is free software, after all. And "people may wish them to do so" is passive-aggressive. Thanks for your input.

                      I think the "them" at the end of the sentence might refer to the field values, not the developer -- the intent being to let people use the field values as they wish, not to lean on the developer. Ambiguous pronouns are the bane of the internet. wink

                      Anyway, we all know and appreciate how much you do (me especially). grin grin grin
                        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