<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>
[[eForm]]
Parse error: parse error, unexpected ’[’ in /www/manager/includes/document.parser.class.inc.php(729) : eval()’d code on line 17
# Set Snippet Paths $snipPath = $modx-config[base_path].assetssnippets; ... include_once ($snipPath.eformeform.inc.php);
<?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;
?>
Document or chunk not found for template id= ’’
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
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= ''
# 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'], ...
from => isset($from)? $from:$modx->config['emailsender'], //OUTPUT ABOVE: [from] => [email protected]
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).
...it appears that the isset check is not passing, since the only values coming through are the system defaults, etc.
This discussion is closed to further replies. Keep calm and carry on.