Here’s another improvement of eForm, but before I’m dumping it in the reporitory I’d like some testers!
I’ve still got a few things to do before it’s final but that’s mostly todo with the documentation so bear with me...
Oh yes, It’s BETA, don’t use it in production sites just yet!
Here’s what’s changed:
- Fixed: &debug parameter wasn’t doing anything
- Fixed: Returning ’foreach’ error when chunk or document not found for form template
- Fixed: Erroneous error when using multiple forms on a page ($formats persisted between eForm calls)
- Updated: Events now work using the &eFormOnBeforeMailSent and &eFormOnMailSent paramaters.
The previous event structure did not appear to work without some tricks (variables were out of scope)
- Updated: [+subject+] can now be used in report and thank you templates
- Updated: When using a document for the templates the document no longer needs to have published set
- New: Show error if &tpl is set to the same document (id) containing the eForm snippet call
- New: extended debug messages for validated fields (if &debug is set)
- New: added some protection against mail injection (still to do -
send ’abuse alert’ mail to [(mailsender)] (controlled by a configuration parameter)
- New: You can now use <form id="formName"...> to match your &formid=`formName`
instead of <input type="hidden" name="formid" value="formName" />
- New: You can now set the description using the label tag instead of in the eform attribute
eg. <label for="email">Your Email</label><input type="text" name="email" eform=":email:1::/>
instead of <label>Your Email</label><input type="text" name="email" eform="Your Email:email:1::/>
If both are used the eform value takes precedence.
- New: Added &disclaimer parameter for adding a disclaimer to the email body. Can be chunk name or document id
Need to manually add [+disclaimer+] placeholder to report template
- Optimized: moved form parser code so it is only executed when form is posted
- Updated: You can again use placeholders in &from and &fromname (as you can with &subject and &keywords)
- Updated: It is now possible to use special placeholders in #SELECT validation rule i.e.
#SELECT jobnum FROM translation_jobs WHERE client_email={email}
- New: you can now use the #LIST validation rule for file type checking with file uploads
by supplying a list of file extensions eg: #LIST jpg,jpeg,png,gif
- New Examples:
[list]
[li]Multiple forms on one page
- How to use eform events
[/li]
[/list]
EDIT: updated eform.snippet.tpl in teh zip file. For some reason all ? & were stripped in the original.
Edit 13 October 2006:
Some fixes and 1 new addition.
Make sure to replace the snippet with the content from eform.snippet.tpl as well.
# New: Extra parameters &sendAsHtml and &sendAsText - force email messages to be in Html
# or text only format. Possible values:
# &sendAsHTML=`1`- send all messages as html
# &sendAsHTML=`[report],[autotext],[mobile]`- send specified messages as html
# &sendAsText=`1`- send all messages as text only
# &sendAsText=`[report],[autotext],[mobile]`- send specified messages as text only
# Fixed: eform attribute not stripped when form is displayed first time
# Fixed: Error getting templates from document id when this document is published
# Fixed: Stupid copy/paste errors in snippet call
# Fixed: placeholders not getting replaced in the report
EDIT - Version 1.4 has now been added to the repository
To download eForm and for an updated list of all changes see the
repository