I’ve never seen that one and I can’t imagine what would cause it unless dev_cw is right about modx_security.
Have you tried leaving the code in the files and just putting an "include" line in the snippet as described in the SPForm readme.txt file?
What happpens when you try to create a simple new snippet (<?php echo ’hello world’; >) ?
Quote from: kongondo at Jul 23, 2009, 06:15 AM
Bob,
SPForm 3.0.9 beta for Revo still has: "Features: * MODx 0.9.7 compatible" in the more info pane in the Package Retriever. 
cheers/k
Thanks for letting me know. . .
Well, I think it IS 0.9.7 compatible.
There’s no easy way for me to fix it, since I don’t have access to that repository.
Bob,
Thanks a lot, the installation and config was really easy thanks to the well-done tutorial and the many comments in the source files. I liked the fact that useful infos are well mixed with the corresponding source code lines.
Two questions:
1) The drop list always starts with a blank <option>. Is there some hack to remove this blank option ?
2) Bob, would something like [!SPForm &selectedItem=`3` !] be hard to implement for you who is the most familiar with the SPForm source code ?
I mean it would be very useful if one could select the correct default "destination address" in each call of SPForm.
As long as I know, SPFrom currently doesn’t accept arguments...
Thanks for your answer.
Jul
Quote from: Jul at Sep 14, 2009, 12:10 PM
Bob,
Thanks a lot, the installation and config was really easy thanks to the well-done tutorial and the many comments in the source files. I liked the fact that useful infos are well mixed with the corresponding source code lines.
Two questions:
1) The drop list always starts with a blank <option>. Is there some hack to remove this blank option ?
2) Bob, would something like [!SPForm &selectedItem=`3` !] be hard to implement for you who is the most familiar with the SPForm source code ?
I mean it would be very useful if one could select the correct default "destination address" in each call of SPForm.
As long as I know, SPFrom currently doesn’t accept arguments...
Thanks for your answer.
Jul
The drop-down list shouldn’t have any blank lines. It’s based on your contacts.inc.cfg file. Make sure that the only uncommented lines in that file are actual addresses and that each line is in this form:
As for the selection using a &selectedItem parameter, this should do it:
Find this code around line 207 in spform.inc.php:
if(strtolower($key) == $selected)
print("selected ");
Change it to:
if(strtolower($key) == strtolower($selectedItem))
print("selected ");
Note that the &selectedItem parameter must contain the name of the default recipient (the first item in the contacts file line), not a number.
OK, I redid the code to make this more flexible. SPForm 1.0.5 (for MODx Evolution and earlier) is available here:
http://bobsguides.com/spform-tutorial.html
You can now specify the default recipient in the drop-down list in either the snippet call or the link to the contact form. Assuming that your contact form has the ID 12:
With Friendly URLs:
<a href = "[~12~]?selected=Webmaster">Contact</a>
Without Friendly URLs:
<a href = "[~12~]&selected=Webmaster">Contact</a>
In the snippet call:
[!SPForm? &selectedItem=`Webmaster`!]
Note that it is "selected" in the link but "&selectedItem" in the snippet call.
I’ve never seen that. Try removing the comment lines. If that doesn’t work, try creating a new file and typing (not pasting) in the three lines you want, there may be something odd in the file itself.