We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32025
    • 305 Posts
    I like many in this thread am having eForm problems. I followed the instructions in the docs called dForm examples. The form does not process, validate, show errors and then directs to a page that is non existent.

    You can see my form here: http://70.85.226.130/~apicsday/information/contact.html

    I have the eForm Snipplet v.1.4.4.6 and here is the code that is located in that snipplet:
    <?php
    # eForm 1.4.4.6 - Electronic Form Snippet
    # Original created by Raymond Irving 15-Dec-2004.
    # Version 1.3+ extended by Jelle Jager (TobyL) September 2006
    # -----------------------------------------------------
    # Captcha image support - thanks to Djamoer
    # Multi checkbox, radio, select support - thanks to Djamoer
    # Form Parser and extened validation - by Jelle Jager
    #
    # see eform/docs/eform.htm for history, usage and examples
    #
    
    # Set Snippet Paths
    $snipFolder = isset($snipFolder)?$snipFolder:'eform';
    $snipPath = $modx->config["base_path"].'assets/snippets/'.$snipFolder.'/';
    
    
    # check if inside manager
    if ($modx->isBackend()) {
    return ''; # don't go any further when inside manager
    }
    
    //tidying up some casing errors in parameters
    if(isset($eformOnValidate)) $eFormOnValidate = $eformOnValidate;
    if(isset($eformOnBeforeMailSent)) $eFormOnBeforeMailSent = $eformOnBeforeMailSent;
    if(isset($eformOnMailSent)) $eFormOnMailSent = $eformOnMailSent;
    if(isset($eformOnValidate)) $eFormOnValidate = $eformOnValidate;
    if(isset($eformOnBeforeFormMerge)) $eFormOnBeforeFormMerge = $eformOnBeforeFormMerge;
    if(isset($eformOnBeforeFormParse)) $eFormOnBeforeFormParse = $eformOnBeforeFormParse;
    //for sottwell :)
    if(isset($eFormCSS)) $cssStyle = $eFormCSS;
    
    # Snippet customize settings
    $params = array (
       // Snippet Path
       'snipPath' => $snipPath, //includes $snipFolder
    	 'snipFolder' => $snipFolder,
    
    // eForm Params
       'vericode' => isset($vericode)? $vericode:"",
       'formid' => isset($formid)? $formid:"feedackForm",
       'from' => isset($from)? $from:$modx->config['emailsender'],
       'fromname' => isset($fromname)? $fromname:$modx->config['site_name'],
       'to' => isset($to)? $to:$modx->config['emailsender'],
       'cc' => isset($cc)? $cc:"",
       'bcc' => isset($bcc)? $bcc:"",
       'subject' => isset($subject)? $subject:"",
       'ccsender' => isset($ccsender)?$ccsender:0,
       'sendirect' => isset($sendirect)? $sendirect:0,
       'mselector' => isset($mailselector)? $mailselector:0,
       'mobile' => isset($mobile)? $mobile:'',
       'mobiletext' => isset($mobiletext)? $mobiletext:'',
       'autosender' => isset($autosender)? $autosender:$from,
       'autotext' => isset($automessage)? $automessage:"",
       'category' => isset($category)? $category:0,
       'keywords' => isset($keywords)? $keywords:"",
       'gid' => isset($gotoid)? $gotoid:$modx->documentIdentifier,
       'noemail' => isset($noemail)? ($noemail):false,
       'saveform' => isset($saveform)? ($saveform? true:false):true,
       'tpl' => isset($tpl)? $tpl:"",
       'report' => isset($report)? $report:"",
       'allowhtml' => isset($allowhtml)? $allowhtml:0,
       //Added by JJ
       'replyto' => isset($replyto)? $replyto:"",
       'language' => isset($language)? $language:$modx->config['manager_language'],
       'thankyou' => isset($thankyou)? $thankyou:"",
       'isDebug' => isset($debug)? $debug:0,
       'reportAbuse' => isset($reportAbuse)? $reportAbuse:false,
       'disclaimer' => isset($disclaimer)?$disclaimer:'',
       'sendAsHtml' => isset($sendAsHtml)?$sendAsHtml:false,
       'sendAsText' => isset($sendAsText)?$sendAsText:false,
       'sessionVars' => isset($sessionVars)?$sessionVars:false,
       'postOverides' => isset($postOverides)?$postOverides:0,
       'eFormOnBeforeMailSent' => isset($eFormOnBeforeMailSent)?$eFormOnBeforeMailSent:'',
       'eFormOnMailSent' => isset($eFormOnMailSent)?$eFormOnMailSent:'',
       'eFormOnValidate' => isset($eFormOnValidate)?$eFormOnValidate:'',
       'eFormOnBeforeFormMerge' => isset($eFormOnBeforeFormMerge)?$eFormOnBeforeFormMerge:'',
       'eFormOnBeforeFormParse' => isset($eFormOnBeforeFormParse)?$eFormOnBeforeFormParse:'',
       'cssStyle' => isset($cssStyle)?$cssStyle:'',
       'jScript' => isset($jScript)?$jScript:'',
       'submitLimit' => (isset($submitLimit) &&  is_numeric($submitLimit))?$submitLimit*60:0,
       'protectSubmit' => isset($protectSubmit)?$protectSubmit:1,
       'requiredClass' => isset($requiredClass)?$requiredClass:"required",
       'invalidClass' => isset($invalidClass)?$invalidClass:"invalid",
       'runSnippet' => ( isset($runSnippet) && !is_numeric($runSnippet) )?$runSnippet:'',
       'autoSenderName' => isset($autoSenderName)?$autoSenderName:'',
       'version' => '1.4.4'
    );
    
    // pixelchutes PHx workaround
    foreach( $params as $key=>$val ) $params[ $key ] = str_replace( array('((','))'), array('[+','+]'), $val );
    
    # Start processing
    
    include_once ($snipPath."eform.inc.php");
    
    $output = eForm($modx,$params);
    
    # Return
    return $output;
    ?>


    I have 3 chucks called: eFeedbackForm, eFeedbackReport, and eFeedbackThanks, per the eForm_examples.

    And this is the code that I placed in my contact page:
    <p>[!eForm? &formid=`feedbackForm` &to=`[email protected],[email protected],[email protected]` &tpl=`eFeedbackForm` &report=`eFeedbackReport` &thankyou=`eFeedbackThanks` &mailselector=`department` &vericode=`1` &subject=`Web site feedback`!]</p>]


    I feel this is something simple but I cannot find the answer. Any help would be much appreciated!
      Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
      • 32025
      • 305 Posts
      Anyone please? Am I missing something easy here?
        Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
        • 8609
        • 607 Posts
        I just tested the form, it didn’t show any errors, and it did redirect me to an existing page -> http://70.85.226.130/~apicsday/information/information/contact.html

        Check to see if the email was sent - it’s from mary.

        What do your chunks look like?
          • 4310
          • 2,310 Posts
          <form method="post" action="information/contact.html">

          Shouldn’t have the extra information/ in the action field.
            • 32025
            • 305 Posts
            Quote from: einsteinsboi at Feb 12, 2010, 03:09 PM

            I just tested the form, it didn’t show any errors, and it did redirect me to an existing page -> http://70.85.226.130/~apicsday/information/information/contact.html

            Check to see if the email was sent - it’s from mary.

            What do your chunks look like?

            I did not get your message. Here are my chunks:
            eFeedbackForm (4) (Locked)
            [+validationmessage+]
            <form method="post" action="[~[*id*]~]">
                <input type="hidden" name="formid" value="feedbackForm" />
                
                <p><label accesskey="n" for="Name">Your Name</label>
                <input type="text" name="Name" maxlength="60" eform="Your Name::1:Expected at least two words:#REGEX /^\w+\s\w+/i" /></p>
            
                <p><label accesskey="e" for="email">Your Email Address</label>
                <input type="text" name="email" size="40" maxlength="40" eform="Your Email Address:email:1" /></p>
                
                <p><label accesskey="s" for="department">Subject</label>
                <select name="department">
                    <option value="1">Comments</option>
                    <option value="2">Questions</option>
                    <option value="3">Feedback</option>
                    <option value="4">Programs</option>
                    <option value="5">Upcoming Events</option>
                    <option value="6">Website Feedback</option>
                    <option value="7">Other</option>
                </select></p>
                
                <p><label accesskey="c" for="comments">Comments</label>
                <textarea cols="40" rows="10" name="comments" eform="Comments:html:1"></textarea></p>
            
                <p>
                Please enter the anti spam code below:<br />
                <img src="[+verimageurl+]" alt="verification code" border="1"/>
                </p>
                <p>
                <label accesskey="c" for="vericode">code</label>
                <input type="text" name="vericode" size="20" />
                </p>
                
                <p><input type="submit" name="submit" value="Submit Form"></p>
            </form> 

            eFeedbackReport (5) (Locked)
            <p>This is a response sent by [+name+] using the feedback form on the website. The details of the message follow below:</p>
            <table>
            <tr valign="top"><td>Name:</td><td>[+name+]</td></tr>
            <tr valign="top"><td>Email:</td><td>[+email+]</td></tr>
            <tr valign="top"><td>Comments:</td><td>[+comments+]</td></tr>
            </table>
            <p>You can use this link to reply: <a href="mailto:[+email+]?subject=RE:[+subject+]">[+email+]</a></p>

            eFeedbackThanks (6) - Thank You Message (Locked)
            <h3>Thank you for your feedback</h3>
            <p>We will contact you as soon as possible.</p>
            <p>Below is a copy of your message:</p>
            <table>
            <tr><td>Your name:</td><td>[+name+]</td></tr>
            <tr><td>Your email address</td><td>[+email+]</td></tr>
            <tr valign="top"><td>Your comments</td><td>[+comments+]</td></tr>
            </table>
              Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/
              • 4310
              • 2,310 Posts
              For testing try hard coding :
              <form method="post" action="contact.html">
                • 32025
                • 305 Posts
                Thanks Bunk that was the problem.

                In the feedback form chunk I had to change this:
                <form method="post" action="[~[*id*]~]">

                to this:
                <form method="post" action="[(base_url)][~17~]">


                Had to add the base url because the this form is located in a subdirectory instead of being a root page.

                Yeah I have a working form now!
                  Making the web a better place on site at a time! Dayton Web Design: http://www.dayton-web-design.com/