We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 727
    • 502 Posts
    Thanks for the suggestion, but it didn’t help. My chunk now looks like:

    <p><span style="color:#900;">[+validationmessage+]</span></p>
    <form id="contactusform" method="post" action="[~[*id*]~]">
      <input type="hidden" name="formid" value="contactusform" />
      <input type="text" name="email" eform="Email Address:email:1" />
      <input type="submit" name="submit" value="Send" />
    </form>
    


    Spaces between the parameters wouldn’t make a difference.

    Andy
      • 23491 ☆ A M B ☆
      • 1,056 Posts
      Also, If I run your code (renaming my chunks) or even just
      [[eForm]]
      I get this:


      Parse error: parse error, unexpected ’[’ in /www/manager/includes/document.parser.class.inc.php(729) : eval()’d code on line 17

      And this is also odd. When I look at the source of my snippet, this is an example of the code:

      
      # Set Snippet Paths 
      $snipPath = $modx-config[base_path].assetssnippets;
      
      ...
      
      include_once ($snipPath.eformeform.inc.php);
      


      ...Now that is odd... would include_once ($snipPath.eformeform.inc.php); definitely fail... Andy, can you post your 1.4 snippet, or at least an excerpt to compare if this is related to my issues?
        Mike Reid - www.pixelchutes.com
        MODx Ambassador / Contributor
        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
        ________________________________
        Where every pixel matters.
        • 727
        • 502 Posts
        <?php
        # eForm 1.4 - Electronic Form Snippet 
        # based on eForm snippet
        # Original created by Raymond Irving 15-Dec-2004.
        # 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.inc.php for more details
        #
        
        # Set Snippet Paths 
        $snipPath = $modx->config["base_path"]."assets/snippets/";
        
        # check if inside manager
        if ($modx->isBackend()) {
        	return ''; # don't go any further when inside manager
        }
        
        # Snippet customize settings
        $params = array (
        	// Snippet Path
        	snipPath	=> $snipPath,
        	
        	// eForm Params
        	vericode	=> isset($vericode)? $vericode:"",
        	formid 		=> isset($formid)? $formid:"",
        	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)? 1:0,
        	sendirect	=> isset($sendirect)? 1: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)? true:false,
        	saveform	=> isset($saveform)? ($saveform? true:false):true,
        	tpl		=> isset($tpl)? $tpl:"",
        	report		=> isset($report)? $report:"",
        	allowhtml	=> isset($allowhtml)? 1: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,
        	eFormOnBeforeMailSent => isset($eFormOnBeforeMailSent)?$eFormOnBeforeMailSent:'',
        	eFormOnMailSent => isset($eFormOnMailSent)?$eFormOnMailSent:'',
        	disclaimer	=> isset($disclaimer)?$disclaimer:'',
        	sendAsHtml => isset($sendAsHtml)?$sendAsHtml:false,
        	sendAsText => isset($sendAsText)?$sendAsText:false
        );
        
        
        # Start processing
        
        include_once ($snipPath."eform/eform.inc.php");
        
        $output = eForm($modx,$params);
        
        # Return
        return $output;
        ?>
        


        Andy
          • 16885
          • 255 Posts
          I’m having a little problem with this one as well (might not be snippit-specific, but this seems to be relevant); my veriword.php isn’t generating any valid images. I’ve used exactly the example (exept for some template modifying) but no verification image is popping up (Sadly).
          You can see the gallery live here; http://leftblank.nl/contact-us.html .
          I haven’t really got a clue what’s causing it - eForm didn’t work from the beginning. As ar as I’ve seen GD/ImageMagick works fine (according to my Gallery2).
            • 23491 ☆ A M B ☆
            • 1,056 Posts
            @Andy, thanks!

            ..and guess what?


            Document or chunk not found for template id= ’’
              Mike Reid - www.pixelchutes.com
              MODx Ambassador / Contributor
              [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
              ________________________________
              Where every pixel matters.
              • 727
              • 502 Posts
              OK, so I’m not going mad. I’ll try to find time this evening to debug the problem. I thought about downgrading to 1.3, but that won’t solve anything because I am currently following the svn trunk.

              Andy
                • 23491 ☆ A M B ☆
                • 1,056 Posts
                Quote from: ajayre at Oct 17, 2006, 01:58 PM

                OK, so I’m not going mad. I’ll try to find time this evening to debug the problem. I thought about downgrading to 1.3, but that won’t solve anything because I am currently following the svn trunk.

                Andy



                Ahh..looks like the $params array isn’t fully qualified:

                Array
                (
                    [snipPath] => /www/assets/snippets/
                    [vericode] => 
                    [formid] => 
                    [from] => [email protected]
                    [fromname] => My Website Name
                    [to] => [email protected]
                    [cc] => 
                    [bcc] => 
                    [subject] => 
                    [ccsender] => 0
                    [sendirect] => 0
                    [mselector] => 0
                    [mobile] => 
                    [mobiletext] => 
                    [autosender] => 
                    [autotext] => 
                    [category] => 0
                    [keywords] => 
                    [gid] => 5
                    [noemail] => 
                    [saveform] => 1
                    [tpl] => 
                    [report] => 
                    [allowhtml] => 0
                    [replyto] => 
                    [language] => english
                    [thankyou] => 
                    [isDebug] => 0
                    [reportAbuse] => 
                    [eFormOnBeforeMailSent] => 
                    [eFormOnMailSent] => 
                    [disclaimer] => 
                    [sendAsHtml] => 
                    [sendAsText] => 
                )
                Document or chunk not found for template id= ''
                



                If you go to the snippet code, you can see where this array is initialized:


                # Snippet customize settings
                $params = array (
                	// Snippet Path
                	snipPath	=> $snipPath,
                	
                	// eForm Params
                	vericode	=> isset($vericode)? $vericode:"",
                	formid 		=> isset($formid)? $formid:"",
                	from 		=> isset($from)? $from:$modx->config['emailsender'],
                ...
                


                ...it appears that the isset check is not passing, since the only values coming through are the system defaults, etc.

                	from => isset($from)? $from:$modx->config['emailsender'], //OUTPUT ABOVE: [from] => [email protected]
                

                  Mike Reid - www.pixelchutes.com
                  MODx Ambassador / Contributor
                  [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                  ________________________________
                  Where every pixel matters.
                  • 30223
                  • 1,010 Posts
                  Quote from: Leftblank at Oct 17, 2006, 01:19 PM

                  I’m having a little problem with this one as well (might not be snippit-specific, but this seems to be relevant); my veriword.php isn’t generating any valid images. I’ve used exactly the example (exept for some template modifying) but no verification image is popping up (Sadly).
                  You can see the gallery live here; http://leftblank.nl/contact-us.html .
                  I haven’t really got a clue what’s causing it - eForm didn’t work from the beginning. As ar as I’ve seen GD/ImageMagick works fine (according to my Gallery2).

                  Did you place a <img src="[+verimageurl+]" alt="verification code" border="1" /> placeholder in your form?

                  Also try this in the location bar of your browser:
                  (your.domain.com)/manager/includes/veriword.php?rand=1145 Do you see an image now?


                  Edit: Never mind that, just tried it myself on leftblank.nl and all it returns is the url itself, i.e. something like this http://leftblank.nl/manager/includes/veriword.php?rand=xxxx I’ve seen this before but I can’t recall what the problem and solution was...

                  Quote from: pixelchutes
                  ...it appears that the isset check is not passing, since the only values coming through are the system defaults, etc.

                  I just downloaded rev 1735 from svn and copied the feedback chunks and snippet call from the eform examples and things seem to work out of the box... (I didn’t actually go as far as sending the email - my dev server has smtp disabled at the moment) Could this have been a problem with rev1732 or is this maybe system specific? What’s your configuration?
                    • 727
                    • 502 Posts
                    Rev 1732 is the last revision in the trunk. I have eform 1.0 working on my dev server, so I’m unsure why 1.4 doesn’t work. The only thing I can think of is that I am using it wrong.

                    Andy
                      • 727
                      • 502 Posts
                      Duh - the problem is the first ampersand in the snippet call. I guess you can’t have ? followed by &, but I thought I had used snippet calls like that before...Hmmm....

                      Update: I see that the ? followed by & is shown in the eform examples. So I wonder why it didn’t work for me?

                      Andy

                      This discussion is closed to further replies. Keep calm and carry on.