eForm - The Electronic Form Snippet
Version History
Version 1.4.1
- Fixed: inconsisten casing in event names. All events params are now in the form &eFormOn... (although the &eFormOn... will still work)
- Fixed: If subject comes from a form field the value is cleared before merging placeholders
- Updated: Debug placeholder is now automatically added to form and thankyou template. (It is not auto-added to email message to avoid sending out sensitive info, although you can add the placeholder manually offcourse)
- Fixed: Missing language file produces fatal error. (Will now generate a debug message if debug is on)
- Fixed: Missing 'replyto' in AddAddressToMailer function.
- Fixed: Erroneous closing slash (/) being added in <option ..>> tags
- Fixed: No whitespace before 'selected' and 'checked' attributes
- New: Extra event parameter
&eFormOnFormValidate (triggered after eForm validation has occurred)
- New: Extra event parameter
&eFormOnBeforeFormMerge (triggered when and before form is displayed)
- New: Extra event parameter
&eFormOnBeforeFormParse (triggered after template(s) are loaded and before they are parsed)
Version 1.4
- New: Extra parameter
&sessionVars- comma delimited list of S_SESSION variable names
that can be added to the list of field values.
- New: Extra parameters
&sendAsHtmland
&sendAsText- force email messages to be in Html
or text only format.
- Fixed:
&debugparameter wasn't doing anything
- Fixed: changed erroneous
&isDebugto correct
&debugparameter in documentation
- 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
&eFormOnBeforeMailSentand
&eFormOnMailSentparamaters.
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
&tplis set to the same document (id) containing the eForm snippet call
- New: extended debug messages for validated fields (if
&debugis set)
- New: added some protection against mail injection
- New: &reportAbuse parameter - send 'abuse alert' mail to [(mailsender)] if mail injection is noticed
- 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:
- How to use eform events
- Multiple forms on one page
Version 1.3
- eFormParser included
This version differs from the original in that it incorporates the eFormParser which retrieves part of it's setting and validation information from the form itself by reading the
eformpseudo attribute from the form fields. eForm also no longer requires to set placeholders in each form field with the exception of the
[+vericode+],
[+verimageurl+]and
[+validationmessage+]placeholders.
- Extended Server validation
It is now possible to set validation rules for each field using a list or range of values, regular expressions an more.
- Language Setting
All eForm messages are now stored in a separate language file and a new
&languageparameter has been added.
- Custom validation messages
You can now add custom validation messages to each field. The way messages are displayed has also changed slighty. Empty fields will now be listed in one message instead of using a separate message for each field.