We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21496
    • 225 Posts
    nightsignals Reply #1, 19 years ago
    I’ve use eform on different sites without a problem. Now using exactly the same call for eForm, I’ve got a problem with those parameters not working:

    &from=`[+email+]` &fromname=`[+name+]` 


    While those fields are populated in the email template, they don’t appear in the header of the email message. It means it doesn’t have a from e-mail address and no from name. Hard coding them instead of taking them from the form doesn’t make a difference.

    As this new site is on a different server than the other pages, I guess it must be somehow related to this.

    Any hints how to track this problem?

      René
      • 30223
      • 1,010 Posts
      Try this instead:
      &from=`email` &fromname=`name` 
      
        • 21496
        • 225 Posts
        nightsignals Reply #3, 19 years ago
        Thanks for the input, but I’m just getting ’name’ then as senders name. That means hard coding name and email would work, but of course what I need is the input from the form fields.

        My form looks like that:

        <div id="form">
        <p><span style="color:#900;">[+validationmessage+]</span></p>
        <form id="eFeedbackForm" method="post" action="[~[*id*]~]">
        <div>
        <label for="name">Vorname/Name *</label>
        	<input class="cform"  type="text" id="name" name="name" size="40" maxlength="40" eform="Ihr Name:string:1" /> </div>
        <div><label for="email">E-Mail *</label>
        	<input class="cform" type="text" id="email" name="email" size="40" maxlength="40" eform="Ihre E-Mail Adresse:email:1" /></div> 
        <div><label for="mitteilung">Mitteilung *</label><br />
        	<textarea class="cform" id="mitteilung" name="mitteilung" cols="40" rows="6" eform="Mitteilung:html:1"></textarea> </div>
        
         <div>Bitte diesen Anti-Spam Code unten eintragen:<br />
            <img id="vericode" src="[+verimageurl+]" alt="verification code" /><br />
        <label for="vericode"> Code *</label>
         <input class="cform" type="text" name="vericode" size="20" /></div>
         <div>   
        <br />
        	<input type="submit" value="Senden" class="buttonSubmit" /></div>
        <p style="margin-top: 20px">Ihre Angaben und Ihre E-Mail Adresse werden nicht an Dritte weitergegeben. Zu Ihrer Kontrolle wird die Mitteilung nach dem Senden hier angezeigt.</p>
        </form>
        </div>


        And this is how I call eForm (called with a TV):

        [!eForm? &language=`german` &formid=`eFeedbackForm` &from=`[+email+]` &fromname=`[+name+]` &subject=`Mitteilung Kontaktformular` &tpl=`eFeedbackForm` &report=`eFeedbackReport` &thankyou=`eFeedbackThanks` &vericode=`1` &sendAsText=`1` !]


        It’s a fresh install of modx 0.9.6, with eForm 1.4.4

        Any ideas why [+email+] and [+name+] work in the report, but not for the header of the email message? And as I’ve said, exactly the same implementation works fine on another server.
          René
          • 30223
          • 1,010 Posts
          Sorry, should have ignored me. Wasn’t thinking straight (or rather thinking of something else altogether when I wrote the reply).

          The fact that they do show correctly in the report doesn’t say all that much about problems with any placeholders in snippet calls. They are handled differently. Check if you have the PHx plugin installed. This is incompatible with eForm and can cause just the problem you are experiencing.
            • 21496
            • 225 Posts
            nightsignals Reply #5, 19 years ago
            Indeed I have the PHx plugin installed for that page, and not for the others where eForm is doing fine. When PHx is disabled, eForm works fine also here. But ... what needs to be hacked now? eForm or the PHx problem? Is there any solution? I’ve just discovered the nice things that can be done with PHx ... huh
              René
              • 21496
              • 225 Posts
              nightsignals Reply #6, 19 years ago
              okay ... I found a quick and dirty solution:

              When I place

              if ($modx->documentIdentifer =! 6) {
              
              ......
              
              }
              


              around the plugin code, then the PHx parser is not called for the specified ID. As I don’t need PHx function on my contact pages, this works for me for this moment. Do you know of another solution?
                René
                • 30223
                • 1,010 Posts
                Have a look through this thread, otherwise start browsing the PHx support forum

                  • 21496
                  • 225 Posts
                  nightsignals Reply #8, 19 years ago
                  Thanks Jeff for your input. For the moment, I stick to my "dirty hack". I think the problem needs to be addressed in PHx.
                    René